Package repast.simphony.parameter
Class ConstantSetter<T>
- java.lang.Object
-
- repast.simphony.parameter.ConstantSetter<T>
-
- All Implemented Interfaces:
ParameterSetter
public class ConstantSetter<T> extends Object implements ParameterSetter
AParameterSetter
that will set a parameter to a given value. This always returns true on on itsatEnd()
method.- Author:
- Jerry Vos
-
-
Field Summary
Fields Modifier and Type Field Description protected String
parameterName
-
Constructor Summary
Constructors Constructor Description ConstantSetter()
ConstantSetter(String parameterName, T constant)
Constructs this to set the given parameter to the given value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
atEnd()
Returns true.String
getParameterName()
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 Detail
-
parameterName
protected String parameterName
-
-
Method Detail
-
getParameterName
public String getParameterName()
Gets the name of the parameter that this setter should set.- Returns:
- the name of the parameter that this setter should set.
-
reset
public void reset(Parameters params)
Sets the constant parameter value- Specified by:
reset
in interfaceParameterSetter
-
atEnd
public boolean atEnd()
Returns true.- Specified by:
atEnd
in interfaceParameterSetter
-
next
public void next(Parameters params)
Sets its specified value to its specified parameter name.- Specified by:
next
in interfaceParameterSetter
- Parameters:
params
- the parameters object
-
-