Package repast.simphony.parameter
Class ConstantSetter<T>
java.lang.Object
repast.simphony.parameter.ConstantSetter<T>
- All Implemented Interfaces:
ParameterSetter
A
ParameterSetter
that will set a parameter to a given value. This
always returns true on on its atEnd()
method.- Author:
- Jerry Vos
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstantSetter
(String parameterName, T constant) Constructs this to set the given parameter to the given value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
atEnd()
Returns true.Gets the name of the parameter that this setter should set.void
next
(Parameters params) Sets its specified value to its specified parameter name.void
reset
(Parameters params) Sets the constant parameter value
-
Field Details
-
parameterName
-
-
Constructor Details
-
ConstantSetter
public ConstantSetter() -
ConstantSetter
Constructs this to set the given parameter to the given value.- Parameters:
parameterName
- the name of the parameterconstant
- the value to set the parameter to
-
-
Method Details
-
getParameterName
Gets the name of the parameter that this setter should set.- Returns:
- the name of the parameter that this setter should set.
-
reset
Sets the constant parameter value- Specified by:
reset
in interfaceParameterSetter
-
atEnd
public boolean atEnd()Returns true.- Specified by:
atEnd
in interfaceParameterSetter
-
next
Sets its specified value to its specified parameter name.- Specified by:
next
in interfaceParameterSetter
- Parameters:
params
- the parameters object
-