|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.babaroga.test.Args
public final class Args
Provides a clean, uniform way to check argument validity.
| Method Summary | |
|---|---|
static void |
checkNonNull(java.lang.Object object)
Throws an IllegalArgumentException if the specified object is not
null. |
static void |
checkNonNull(java.lang.Object object,
java.lang.String message)
Throws an IllegalArgumentException if the specified object is not
null. |
static void |
checkNotEmpty(java.lang.String s)
Throws an IllegalArgumentException if the specified string is
empty. |
static void |
checkNotEmpty(java.lang.String s,
java.lang.String message)
Throws an IllegalArgumentException if the specified string is
empty. |
static void |
checkPositive(int integer)
Throws an IllegalArgumentException if the specified integer is
not positive. |
static void |
checkPositive(int integer,
java.lang.String message)
Throws an IllegalArgumentException if the specified integer is
not positive. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void checkNonNull(java.lang.Object object)
IllegalArgumentException if the specified object is not
null.
object - The object to check for null.
public static void checkNonNull(java.lang.Object object,
java.lang.String message)
IllegalArgumentException if the specified object is not
null.
object - The object to check for null.message - A message to pass to the exception.public static void checkPositive(int integer)
IllegalArgumentException if the specified integer is
not positive.
integer - The integer to check if positive.
public static void checkPositive(int integer,
java.lang.String message)
IllegalArgumentException if the specified integer is
not positive.
integer - The integer to check if positive.message - A message to pass to the exception.public static void checkNotEmpty(java.lang.String s)
IllegalArgumentException if the specified string is
empty.
s - The string to check if empty.
public static void checkNotEmpty(java.lang.String s,
java.lang.String message)
IllegalArgumentException if the specified string is
empty.
s - The string to check if empty.message - A message to pass to the exception.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||