|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.tomgibara.pronto.util.Arguments
public final class Arguments
Holds static methods for performing common checks on method parameters.
| Method Summary | |
|---|---|
static void |
notEmpty(java.lang.String str,
java.lang.String name)
Tests whether the supplied string parameter is not null and not the empty string. |
static void |
notNegative(long num,
java.lang.String name)
Tests whether the supplied long parameter is not negative. |
static void |
notNull(java.lang.Object obj,
java.lang.String name)
Tests whether the supplied parameter is null. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void notNull(java.lang.Object obj,
java.lang.String name)
throws java.lang.IllegalArgumentException
obj - the parametername - the name of the parameter
java.lang.IllegalArgumentException - if the parameter is null
public static void notEmpty(java.lang.String str,
java.lang.String name)
throws java.lang.IllegalArgumentException
str - the string parametername - the name of the parameter
java.lang.IllegalArgumentException - if the parameter is null or has zero length
public static void notNegative(long num,
java.lang.String name)
throws java.lang.IllegalArgumentException
num - the long parametername - the name of the parameter
java.lang.IllegalArgumentException - if the parameter is less than zero
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||