- java.lang.Object
-
- org.joox.selector.Assert
-
final class Assert extends java.lang.Object
Assertion utility methods.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Assert()
Private CTOR.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
isTrue(boolean expression, java.lang.String message)
Check if the specifiedexpression
istrue
.static void
notNull(java.lang.Object object, java.lang.String message)
Check if the specifiedobject
isnull
, and throw anIllegalArgumentException
if it is.
-
-
-
Method Detail
-
isTrue
public static void isTrue(boolean expression, java.lang.String message)
Check if the specifiedexpression
istrue
. If not throw anIllegalArgumentException
with the specifiedmessage
.- Parameters:
expression
- The expression to check.message
- The exception message if theexpression
isfalse
.
-
notNull
public static void notNull(java.lang.Object object, java.lang.String message)
Check if the specifiedobject
isnull
, and throw anIllegalArgumentException
if it is.- Parameters:
object
- The object to check.message
- The exception message if theobject
isnull
.
-
-