|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfc.util.Argcheck
public final class Argcheck
This class is intended primarily for checking whether method paramaters meet various pre-conditions. Throws a IllegalArgumentException in case of failure.
ThreadSafety: This class is thread safe and can be used by multiple threads concurrently.
| Method Summary | |
|---|---|
static void |
isequal(java.lang.Object a,
java.lang.Object b)
Checks that the specified arguments are equal to each other by using Object.equals(). |
static void |
isequal(java.lang.Object a,
java.lang.Object b,
java.lang.String message)
Checks that the specified arguments are equal to each other by using Object.equals(). |
static void |
isfalse(boolean val)
Checks that the specified argument is false. |
static void |
isfalse(boolean val,
java.lang.String message)
Checks that the specified argument is false. |
static void |
isnull(java.lang.Object obj)
Checks that the specified argument is null. |
static void |
isnull(java.lang.Object obj,
java.lang.String message)
Checks that the specified argument is null. |
static void |
issame(java.lang.Object a,
java.lang.Object b)
Checks to see if specified objects are the same object, that is, the references are identical. |
static void |
issame(java.lang.Object a,
java.lang.Object b,
java.lang.String message)
Checks to see if specified objects are the same object, that is, the references are identical. |
static void |
istrue(boolean val)
Checks that the specified argument is true. |
static void |
istrue(boolean val,
java.lang.String message)
Checks that the specified argument is true. |
static void |
notequal(java.lang.Object a,
java.lang.Object b)
Checks that the specified arguments are not equal to each other by using Object.equals(). |
static void |
notequal(java.lang.Object a,
java.lang.Object b,
java.lang.String message)
Checks that the specified arguments are not equal to each other by using Object.equals(). |
static void |
notnull(java.lang.Object obj)
Checks that the specified argument is not null. |
static void |
notnull(java.lang.Object obj,
java.lang.String message)
Checks that the specified argument is not null. |
static void |
notsame(java.lang.Object a,
java.lang.Object b)
Checks to see if specified objects are not the same object, that is, the references are not identical. |
static void |
notsame(java.lang.Object a,
java.lang.Object b,
java.lang.String message)
Checks to see if specified objects are not the same object, that is, the references are not identical. |
static boolean |
setHandler(IArgcheckFailHandler thehandler)
Sets a different error handler. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void isfalse(boolean val)
val - value to be tested
public static void isfalse(boolean val,
java.lang.String message)
val - value to be testedmessage - message for the exceptionpublic static void istrue(boolean val)
val - value to be tested
public static void istrue(boolean val,
java.lang.String message)
val - value to be testedmessage - message for the exceptionpublic static void notnull(java.lang.Object obj)
obj - value to be tested
public static void notnull(java.lang.Object obj,
java.lang.String message)
obj - value to be testedmessage - message for the exceptionpublic static void isnull(java.lang.Object obj)
obj - value to be tested
public static void isnull(java.lang.Object obj,
java.lang.String message)
obj - value to be testedmessage - message for the exception
public static void isequal(java.lang.Object a,
java.lang.Object b)
a - first value to be testedb - second value to be tested
public static void isequal(java.lang.Object a,
java.lang.Object b,
java.lang.String message)
a - first value to be testedb - second value to be testedmessage - message message for the exception
public static void notequal(java.lang.Object a,
java.lang.Object b)
a - first value to be testedb - second value to be tested
public static void notequal(java.lang.Object a,
java.lang.Object b,
java.lang.String message)
a - first value to be testedb - second value to be testedmessage - message message for the exception
public static void issame(java.lang.Object a,
java.lang.Object b)
a - first value to be testedb - second value to be tested
public static void issame(java.lang.Object a,
java.lang.Object b,
java.lang.String message)
a - first value to be testedb - second value to be testedmessage - message message for the exception
public static void notsame(java.lang.Object a,
java.lang.Object b)
a - first value to be testedb - second value to be tested
public static void notsame(java.lang.Object a,
java.lang.Object b,
java.lang.String message)
a - first value to be testedb - second value to be testedmessage - message message for the exceptionpublic static boolean setHandler(IArgcheckFailHandler thehandler)
thehandler - the new error handler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||