public class Checker
extends java.lang.Object
Constructor and Description |
---|
Checker() |
Modifier and Type | Method and Description |
---|---|
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 |
public static boolean isNotNull(java.lang.Object obj)
notNull
- check if an object has no null referenceobj
- an Object
boolean
value - if not Null; otherwise a NullPointerException is thrownpublic static boolean isNotNull(java.lang.Object obj, java.lang.String text)
notNull
- check if an object has no null referenceobj
- an Object
text
- Represents the text message to be thrown if the Object is nullboolean
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 valueresult
- Represents the boolean valueboolean
value - if true; IllegalArgumentException is thrown insteadpublic static boolean isArgValid(boolean result, java.lang.String text)
argValid
- check if the boolean expression returns a true valueresult
- Represents the boolean valuetext
- Represents the text message to be thrown if the value is falseboolean
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 valueresult
- Represents the boolean valueboolean
value - if true; RuntimeException is thrown insteadpublic static boolean assertTrue(boolean result, java.lang.String text)
assertTrue
- check if the boolean expression returns a true valueresult
- an Object
text
- Represents the text message to be thrown if the value is falseboolean
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 valueresult
- Represents the boolean valueboolean
value - if true; RuntimeException is thrown insteadpublic static boolean assertFalse(boolean result, java.lang.String text)
assertFalse
- check if the boolean expression returns a true valueresult
- an Object
text
- Represents the text message to be thrown if the value is falseboolean
value - if true; RuntimeException is thrown instead, having
text as message
JCSC is released under the terms of the GNU General Public License