public final class Argcheck extends Object
ThreadSafety: This class is thread safe and can be used by multiple threads concurrently.
Modifier and Type | Method and Description |
---|---|
static void |
isequal(Object a,
Object b)
Checks that the specified arguments are equal to each other by using
Object.equals().
|
static void |
isequal(Object a,
Object b,
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,
String message)
Checks that the specified argument is false.
|
static void |
isnull(Object obj)
Checks that the specified argument is null.
|
static void |
isnull(Object obj,
String message)
Checks that the specified argument is null.
|
static void |
issame(Object a,
Object b)
Checks to see if specified objects are the same object, that is, the
references are identical.
|
static void |
issame(Object a,
Object b,
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,
String message)
Checks that the specified argument is true.
|
static void |
main(String[] args) |
static void |
notequal(Object a,
Object b)
Checks that the specified arguments are not equal to each other by using
Object.equals().
|
static void |
notequal(Object a,
Object b,
String message)
Checks that the specified arguments are not equal to each other by using
Object.equals().
|
static void |
notnull(Object obj)
Checks that the specified argument is not null.
|
static void |
notnull(Object obj,
String message)
Checks that the specified argument is not null.
|
static void |
notsame(Object a,
Object b)
Checks to see if specified objects are not the same object, that is, the
references are not identical.
|
static void |
notsame(Object a,
Object b,
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.
|
public static void isfalse(boolean val)
val
- value to be testedpublic static void isfalse(boolean val, String message)
val
- value to be testedmessage
- message for the exceptionpublic static void istrue(boolean val)
val
- value to be testedpublic static void istrue(boolean val, String message)
val
- value to be testedmessage
- message for the exceptionpublic static void notnull(Object obj)
obj
- value to be testedpublic static void notnull(Object obj, String message)
obj
- value to be testedmessage
- message for the exceptionpublic static void isnull(Object obj)
obj
- value to be testedpublic static void isnull(Object obj, String message)
obj
- value to be testedmessage
- message for the exceptionpublic static void isequal(Object a, Object b)
a
- first value to be testedb
- second value to be testedpublic static void isequal(Object a, Object b, String message)
a
- first value to be testedb
- second value to be testedmessage
- message message for the exceptionpublic static void notequal(Object a, Object b)
a
- first value to be testedb
- second value to be testedpublic static void notequal(Object a, Object b, String message)
a
- first value to be testedb
- second value to be testedmessage
- message message for the exceptionpublic static void issame(Object a, Object b)
a
- first value to be testedb
- second value to be testedpublic static void issame(Object a, Object b, String message)
a
- first value to be testedb
- second value to be testedmessage
- message message for the exceptionpublic static void notsame(Object a, Object b)
a
- first value to be testedb
- second value to be testedpublic static void notsame(Object a, Object b, 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