org.araneaframework.core
Class Assert
java.lang.Object
org.araneaframework.core.Assert
- public abstract class Assert
- extends Object
Assists in validating arguments.
The class is based along the lines of JUnit. If an argument value is
deemed invalid, an IllegalArgumentException is thrown. For example:
Assert.isTrue( i > 0, "The value must be greater than zero: ", i);
Assert.notNull( surname, "The surname must not be null");
Copied from Jakarta Commons Lang for framework internal use.
Please use the original from http://jakarta.apache.org/commons/lang/.
- Author:
- Ola Berg, Stephen Colebourne, Gary Gregory, Norm Deane, Jevgeni Kabanov (ekabanov at araneaframework dot org)
|
Method Summary |
static void |
isInstanceOf(Class klass,
Object object,
String message)
|
static void |
isInstanceOf(Object that,
Class klass,
Object object,
String message)
|
static void |
isInstanceOfParam(Class klass,
Object object,
String parameterName)
|
static void |
isInstanceOfParam(Object that,
Class klass,
Object object,
String parameterName)
|
static void |
isTrue(boolean expression,
String message)
|
static void |
isTrue(Object that,
boolean expression,
String message)
|
static void |
noNullElements(Collection collection,
String message)
|
static void |
noNullElements(Object that,
Collection collection,
String message)
|
static void |
noNullElementsParam(Collection collection,
String param)
|
static void |
noNullElementsParam(Object that,
Collection collection,
String param)
|
static void |
notEmpty(Collection collection,
String message)
|
static void |
notEmpty(Map map,
String message)
|
static void |
notEmpty(Object[] array,
String message)
|
static void |
notEmpty(String string,
String message)
|
static void |
notEmptyParam(Object that,
String string,
String parameterName)
|
static void |
notEmptyParam(String string,
String parameterName)
|
static void |
notNull(Object object)
|
static void |
notNull(Object that,
Object object,
String message)
|
static void |
notNull(Object object,
String message)
|
static void |
notNullParam(Object that,
Object object,
String parameterName)
|
static void |
notNullParam(Object object,
String parameterName)
|
static String |
thisToString(Object that)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Assert
public Assert()
thisToString
public static String thisToString(Object that)
isTrue
public static void isTrue(Object that,
boolean expression,
String message)
isTrue
public static void isTrue(boolean expression,
String message)
notNull
public static void notNull(Object object)
notNull
public static void notNull(Object that,
Object object,
String message)
notNull
public static void notNull(Object object,
String message)
notNullParam
public static void notNullParam(Object object,
String parameterName)
notNullParam
public static void notNullParam(Object that,
Object object,
String parameterName)
isInstanceOf
public static void isInstanceOf(Object that,
Class klass,
Object object,
String message)
isInstanceOf
public static void isInstanceOf(Class klass,
Object object,
String message)
isInstanceOfParam
public static void isInstanceOfParam(Object that,
Class klass,
Object object,
String parameterName)
isInstanceOfParam
public static void isInstanceOfParam(Class klass,
Object object,
String parameterName)
notEmptyParam
public static void notEmptyParam(String string,
String parameterName)
notEmptyParam
public static void notEmptyParam(Object that,
String string,
String parameterName)
notEmpty
public static void notEmpty(Object[] array,
String message)
notEmpty
public static void notEmpty(Collection collection,
String message)
notEmpty
public static void notEmpty(Map map,
String message)
notEmpty
public static void notEmpty(String string,
String message)
noNullElementsParam
public static void noNullElementsParam(Collection collection,
String param)
noNullElements
public static void noNullElements(Collection collection,
String message)
noNullElementsParam
public static void noNullElementsParam(Object that,
Collection collection,
String param)
noNullElements
public static void noNullElements(Object that,
Collection collection,
String message)