|
||||||||||
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(java.lang.Object parameter,
java.lang.String name)
|
|
static
|
find(java.lang.Class<T> parameterClass,
O... parameters)
Extracts multiple-value parameters of the given type from an array. |
|
static
|
find(java.lang.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 java.lang.Object parameter, @Nonnull java.lang.String name) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
@CheckForNull public static <T,O> T find(@Nonnull java.lang.Class<T> parameterClass, @CheckForNull T defaultOption, @Nonnull O... parameters) throws java.lang.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
java.lang.IllegalArgumentException
@Nonnull public static <T,O> java.util.Collection<T> find(@Nonnull java.lang.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 |