|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.util.lang.Args
public class Args
Constructor Summary | |
---|---|
Args()
|
Method Summary | ||
---|---|---|
static boolean |
isFalse(boolean argument,
String msg,
Object... params)
Check if argument is false |
|
static boolean |
isTrue(boolean argument,
String msg,
Object... params)
Check if argument is true |
|
static void |
notEmpty(Collection<?> collection,
String name)
Checks argument is not null or empty |
|
static void |
notEmpty(Collection<?> collection,
String message,
Object... params)
Checks argument is not null or empty |
|
static
|
notEmpty(T argument,
String name)
Checks argument is not empty (not null and has a non-whitespace character) |
|
static
|
notNull(T argument,
String name)
Checks argument is not null |
|
static
|
withinRange(T min,
T max,
T value,
String name)
Checks if argument is within a range |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Args()
Method Detail |
---|
public static <T> T notNull(T argument, String name)
T
- argument
- name
-
IllegalArgumentException
public static <T extends CharSequence> T notEmpty(T argument, String name)
T
- the type of the argument to check for emptinessargument
- the argument to check for emptinessname
- the name to use in the error message
argument
parameter if not empty
IllegalArgumentException
- when the passed argument
is emptypublic static void notEmpty(Collection<?> collection, String message, Object... params)
collection
- message
- params
-
IllegalArgumentException
- if the passed collection is either null or emptypublic static void notEmpty(Collection<?> collection, String name)
collection
- name
-
IllegalArgumentException
- if the passed collection is either null or emptypublic static <T extends Comparable<T>> void withinRange(T min, T max, T value, String name)
T
- min
- max
- value
- name
-
IllegalArgumentException
public static boolean isTrue(boolean argument, String msg, Object... params)
argument
- msg
- params
-
public static boolean isFalse(boolean argument, String msg, Object... params)
argument
- msg
- params
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |