Package org.apache.wicket.util.lang
Class Checks
- java.lang.Object
-
- org.apache.wicket.util.lang.Checks
-
-
Constructor Summary
Constructors Constructor Description Checks()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
notEmpty(String argument, String message, Object... params)
Checks argument is not empty (not null and has a non-whitespace character)static void
notEmptyShort(String argument, String name)
Checks argument is not empty (not null and has a non-whitespace character)static void
notNull(Object argument, String message, Object... params)
Checks value is not nullstatic void
notNullShort(Object argument, String name)
Checks value is not nullstatic <T extends Comparable<? super T>>
voidwithinRange(T min, T max, T value, String message)
Checks if argument is within a rangestatic <T extends Comparable<? super T>>
voidwithinRangeShort(T min, T max, T value, String name)
Checks if argument is within a range
-
-
-
Constructor Detail
-
Checks
public Checks()
-
-
Method Detail
-
notNull
public static void notNull(Object argument, String message, Object... params)
Checks value is not null- Parameters:
argument
-message
-params
-- Throws:
IllegalStateException
-
notEmpty
public static void notEmpty(String argument, String message, Object... params)
Checks argument is not empty (not null and has a non-whitespace character)- Parameters:
argument
-message
-params
-- Throws:
IllegalStateException
-
withinRange
public static <T extends Comparable<? super T>> void withinRange(T min, T max, T value, String message)
Checks if argument is within a range- Type Parameters:
T
-- Parameters:
min
-max
-value
-message
-- Throws:
IllegalStateException
-
notNullShort
public static void notNullShort(Object argument, String name)
Checks value is not null- Parameters:
argument
-name
-- Throws:
IllegalStateException
-
notEmptyShort
public static void notEmptyShort(String argument, String name)
Checks argument is not empty (not null and has a non-whitespace character)- Parameters:
argument
-name
-- Throws:
IllegalStateException
-
withinRangeShort
public static <T extends Comparable<? super T>> void withinRangeShort(T min, T max, T value, String name)
Checks if argument is within a range- Type Parameters:
T
-- Parameters:
min
-max
-value
-name
-- Throws:
IllegalStateException
-
-