|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectrj.tools.util.Checker
Checker for certain object values; mainly intended for argument checking in methods, but it can also be used to check for pre- and post - conditions. if a check fails, the appropriate RuntimeException is thrown.
| Constructor Summary | |
Checker()
|
|
| Method Summary | |
static boolean |
assertFalse(boolean result)
assertFalse - check if the boolean expression returns a true value |
static boolean |
assertFalse(boolean result,
java.lang.String text)
assertFalse - check if the boolean expression returns a true value |
static boolean |
assertTrue(boolean result)
assertTrue - check if the boolean expression returns a true value |
static boolean |
assertTrue(boolean result,
java.lang.String text)
assertTrue - check if the boolean expression returns a true value |
static boolean |
isArgValid(boolean result)
argValid - check if the boolean expression returns a true value |
static boolean |
isArgValid(boolean result,
java.lang.String text)
argValid - check if the boolean expression returns a true value |
static boolean |
isNotNull(java.lang.Object obj)
notNull - check if an object has no null reference |
static boolean |
isNotNull(java.lang.Object obj,
java.lang.String text)
notNull - check if an object has no null reference |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Checker()
| Method Detail |
public static boolean isNotNull(java.lang.Object obj)
notNull - check if an object has no null reference
obj - an Object
boolean value - if not Null; otherwise a NullPointerException is thrown
public static boolean isNotNull(java.lang.Object obj,
java.lang.String text)
notNull - check if an object has no null reference
obj - an Objecttext - Represents the text message to be thrown if the Object is null
boolean value - if not Null; otherwise a NullPointerException is thrown,
having text as messagepublic static boolean isArgValid(boolean result)
argValid - check if the boolean expression returns a true value
result - Represents the boolean value
boolean value - if true; IllegalArgumentException is thrown instead
public static boolean isArgValid(boolean result,
java.lang.String text)
argValid - check if the boolean expression returns a true value
result - Represents the boolean valuetext - Represents the text message to be thrown if the value is false
boolean value - if true; IllegalArgumentException is thrown instead,
having text as messagepublic static boolean assertTrue(boolean result)
assertTrue - check if the boolean expression returns a true value
result - Represents the boolean value
boolean value - if true; RuntimeException is thrown instead
public static boolean assertTrue(boolean result,
java.lang.String text)
assertTrue - check if the boolean expression returns a true value
result - an Objecttext - Represents the text message to be thrown if the value is false
boolean value - if true; RuntimeException is thrown instead, having
text as messagepublic static boolean assertFalse(boolean result)
assertFalse - check if the boolean expression returns a true value
result - Represents the boolean value
boolean value - if true; RuntimeException is thrown instead
public static boolean assertFalse(boolean result,
java.lang.String text)
assertFalse - check if the boolean expression returns a true value
result - an Objecttext - Represents the text message to be thrown if the value is false
boolean value - if true; RuntimeException is thrown instead, having
text as message
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||