ParameterMappublic class ParameterMapImpl extends Object implements ParameterMap
ParameterMapEMPTY_INSTANCE| Constructor | Description |
|---|---|
ParameterMapImpl(Parameter... p) |
Construct this
ParameterMapImpl for the given Parameter... p |
| Modifier and Type | Method | Description |
|---|---|---|
Set<Parameter> |
getAllParameters() |
|
<T> T |
getValue(Parameter p) |
Get the value for the given parameter.
|
<T> T |
getValue(Parameter p,
T defaultValue) |
Get the value for the given parameter, or the defaultValue, if it has not been set.
|
ParameterMap |
init(Resource r) |
Initialize this
ParameterMap, making it immutable and enabling the getters. |
ParameterMap |
setValue(Parameter p,
Object o) |
Directly set a value for a parameter.
|
public ParameterMapImpl(Parameter... p)
ParameterMapImpl for the given Parameter... pp - an arbitrary number of parameters as a varargpublic Set<Parameter> getAllParameters()
getAllParameters in interface ParameterMapParameterMaps supported parameterspublic <T> T getValue(Parameter p, T defaultValue) throws IllegalStateException
ParameterMapgetValue in interface ParameterMapT - this methods generic return typep - the parameter to getdefaultValue - a defaultValue as fallbackdefaultVaue if the value has not been set or has been set to null;
otherwise, the value of parameter pIllegalStateException - if this ParameterMap has not been initialized yetpublic <T> T getValue(Parameter p) throws IllegalStateException
ParameterMapgetValue in interface ParameterMapT - this methods generic return typep - the parameter to getIllegalStateException - if this ParameterMap has not been initialized yetpublic ParameterMap init(Resource r)
ParameterMapParameterMap, making it immutable and enabling the getters.init in interface ParameterMapr - if not null, this Resource and its corresponding subgraph will be used for
automatic parameter value assignmentParameterMap, for method chainingpublic ParameterMap setValue(Parameter p, Object o) throws IllegalStateException
ParameterMapsetValue in interface ParameterMapp - the parameter which should be seto - the value to set for the given parameterParameterMap, for method chainingIllegalStateException - if this ParameterMap has already been initializedCopyright © 2018. All rights reserved.