public interface Parametric
Modifier and Type | Method and Description |
---|---|
boolean |
containsParameter(java.lang.String name)
Returns whether a parameter with the given
name exists in this parametric object. |
java.lang.Object |
getParameter(java.lang.String name)
Returns an additional parameter with the given
name . |
<T> T |
getParameter(java.lang.String name,
java.lang.Class<? extends T> parameterClass)
Returns an additional parameter with the given
name . |
<T> T |
getParameter(java.lang.String name,
java.lang.Class<? extends T> parameterClass,
T defaultValue)
Returns an additional parameter with the given
name . |
int |
getParameterCount()
Returns the number of additional parameters.
|
java.util.Map<java.lang.String,? extends java.lang.Object> |
getParameterMap()
Returns the map of all additional parameters.
|
java.util.Collection<java.lang.String> |
getParameterNames()
Returns a set of additional parameter names present in this object.
|
java.lang.Object |
getRequiredParameter(java.lang.String name)
Returns an additional parameter with the given
name . |
<T> T |
getRequiredParameter(java.lang.String name,
java.lang.Class<? extends T> parameterClass)
Returns an additional parameter with the given
name . |
int getParameterCount()
java.util.Collection<java.lang.String> getParameterNames()
boolean containsParameter(java.lang.String name)
name
exists in this parametric object.name
- the name of the additional parameter to getname
or false if it does notjava.lang.Object getParameter(java.lang.String name)
name
.name
- the name of the additional parameter to getname
or null if it is not setjava.lang.Object getRequiredParameter(java.lang.String name) throws java.lang.IllegalArgumentException
name
.
If the parameter with the given name
is not set, an exception is thrown.name
- the name of the additional parameter to getname
java.lang.IllegalArgumentException
- if the parameter with the given name
is not set<T> T getRequiredParameter(java.lang.String name, java.lang.Class<? extends T> parameterClass) throws java.lang.IllegalArgumentException, java.lang.ClassCastException
name
.
If the parameter with the given name
is not set or is not an
instance of parameterClass
, an exception is thrown.T
- the class of the parametername
- the name of the additional parameter to getparameterClass
- the class of the parameter to getjava.lang.IllegalArgumentException
- if the parameter with the given name
is not setjava.lang.ClassCastException
- if the parameter with the given name
is not an instance of parameterClass
<T> T getParameter(java.lang.String name, java.lang.Class<? extends T> parameterClass, T defaultValue)
name
.
If the parameter is not set or is not an instance of parameterClass
,
the defaultValue
is returned instead.T
- the class of the parametername
- the name of the additional parameter to getparameterClass
- the class of the parameter to getdefaultValue
- the default value to use if the parameter is null<T> T getParameter(java.lang.String name, java.lang.Class<? extends T> parameterClass)
name
.
If the parameter name
exists but it is not an instance of
parameterClass
, null is returned.T
- the class of the parametername
- the name of the additional parameter to getparameterClass
- the class of the parameter to getname
or null if it is not setjava.util.Map<java.lang.String,? extends java.lang.Object> getParameterMap()