Class Argcheck
java.lang.Object
fc.util.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.
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidChecks that the specified arguments are equal to each other by using Object.equals().static voidChecks that the specified arguments are equal to each other by using Object.equals().static voidisfalse(boolean val) Checks that the specified argument is false.static voidChecks that the specified argument is false.static voidChecks that the specified argument is null.static voidChecks that the specified argument is null.static voidChecks to see if specified objects are the same object, that is, the references are identical.static voidChecks to see if specified objects are the same object, that is, the references are identical.static voidistrue(boolean val) Checks that the specified argument is true.static voidChecks that the specified argument is true.static voidstatic voidChecks that the specified arguments are not equal to each other by using Object.equals().static voidChecks that the specified arguments are not equal to each other by using Object.equals().static voidChecks that the specified argument is not null.static voidChecks that the specified argument is not null.static voidChecks to see if specified objects are not the same object, that is, the references are not identical.static voidChecks to see if specified objects are not the same object, that is, the references are not identical.static booleansetHandler(IArgcheckFailHandler thehandler) Sets a different error handler.
-
Method Details
-
isfalse
Checks that the specified argument is false.- Parameters:
val- value to be tested
-
isfalse
-
istrue
Checks that the specified argument is true.- Parameters:
val- value to be tested
-
istrue
-
notnull
-
notnull
-
isnull
-
isnull
-
isequal
-
isequal
-
notequal
-
notequal
-
issame
-
issame
Checks to see if specified objects are the same object, that is, the references are identical. This provides a stronger notion of equality than the Object.equals() method.- Parameters:
a- first value to be testedb- second value to be testedmessage- message message for the exception
-
notsame
-
notsame
-
setHandler
Sets a different error handler.- Parameters:
thehandler- the new error handler- Returns:
- true is successful, false otherwise
-
main
-