|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.tidalwave.util.Parameters
public final class Parameters
This class provides a few static utility methods to extracts parameters from an array.
Method Summary | ||
---|---|---|
static void |
checkNonNull(Object parameter,
String name)
|
|
static
|
find(Class<T> parameterClass,
O... parameters)
Extracts multiple-value parameters of the given type from an array. |
|
static
|
find(Class<T> parameterClass,
T defaultOption,
O... parameters)
Extracts a singled-value parameter of the given type from an array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void checkNonNull(@CheckForNull Object parameter, @Nonnull String name) throws IllegalArgumentException
IllegalArgumentException
@CheckForNull public static <T,O> T find(@Nonnull Class<T> parameterClass, @CheckForNull T defaultOption, @Nonnull O... parameters) throws IllegalArgumentException
IllegalparameterException
is thrown.
parameterClass
- the class of the parameter to retrievedefaultOption
- the default value of the parameterparameters
- the array of parameters
IllegalparameterException
- if more than a single value is found
IllegalArgumentException
@Nonnull public static <T,O> Collection<T> find(@Nonnull Class<T> parameterClass, @Nonnull O... parameters)
parameterClass
- the class of the parameter to retrieveparameters
- the array of parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |