|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.milyn.assertion.AssertArgument
public abstract class AssertArgument
Argument assertion utilities.
| Constructor Summary | |
|---|---|
AssertArgument()
|
|
| Method Summary | |
|---|---|
static void |
isInstanceOf(Object arg,
Class<?> clazz,
String argName)
Assert that the argument is an instance of the specified class. |
static void |
isNotEmpty(String arg,
String argName)
Assert that the argument is not empty. |
static void |
isNotNull(Object arg,
String argName)
Assert that the argument is not null. |
static void |
isNotNullAndNotEmpty(Collection<?> arg,
String argName)
Assert that the argument is neither null nor empty. |
static void |
isNotNullAndNotEmpty(Map<?,?> arg,
String argName)
Assert that the argument is neither null nor empty. |
static void |
isNotNullAndNotEmpty(Object[] arg,
String argName)
Assert that the argument is neither null nor empty. |
static void |
isNotNullAndNotEmpty(String arg,
String argName)
Assert that the argument is neither null nor empty. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AssertArgument()
| Method Detail |
|---|
public static void isNotNull(Object arg,
String argName)
throws IllegalArgumentException
arg - Argument.argName - Argument name.
IllegalArgumentException - Argument is null.
public static void isNotEmpty(String arg,
String argName)
throws IllegalArgumentException
arg - Argument.argName - Argument name.
IllegalArgumentException - Argument is not null, but is empty.
public static void isNotNullAndNotEmpty(String arg,
String argName)
throws IllegalArgumentException
arg - Argument.argName - Argument name.
IllegalArgumentException - Argument is null or empty.
public static void isNotNullAndNotEmpty(Object[] arg,
String argName)
throws IllegalArgumentException
arg - Argument.argName - Argument name.
IllegalArgumentException - Argument is null or empty.
public static void isNotNullAndNotEmpty(Collection<?> arg,
String argName)
throws IllegalArgumentException
arg - Argument.argName - Argument name.
IllegalArgumentException - Argument is null or empty.
public static void isNotNullAndNotEmpty(Map<?,?> arg,
String argName)
throws IllegalArgumentException
arg - Argument.argName - Argument name.
IllegalArgumentException - Argument is null or empty.
public static void isInstanceOf(Object arg,
Class<?> clazz,
String argName)
throws IllegalArgumentException
arg - Argument.clazz - The Class type to check.argName - Argument name.
IllegalArgumentException - Argument is null or empty.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||