Package repast.simphony.parameter.groovy
Class CustomParameterSetter
- java.lang.Object
-
- repast.simphony.parameter.groovy.CustomParameterSetter
-
- All Implemented Interfaces:
ParameterSetter
public abstract class CustomParameterSetter extends Object implements ParameterSetter
Extendable parameter setter to be used with the groovy based parameter builder. In addition to setting parameter's values this class is also responsible for creating the parameters that it manages. The RunState for the next run will be set prior to each run and implementations can thus use this RunState in theirnext
etc. code.- Author:
- Nick Collier
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CustomParameterSetter(String name, Class parameterType)
Construct a CustomParameterSetter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
addParameters(ParametersCreator creator)
Adds the parameters that this class is responsible for to the ParametersCreator factory.String
getName()
Gets the name of the parameter this setter will set.Class
getParameterType()
Gets the class of the parameter this setter will set.void
init(RunState state)
Initializes this CustomParameterSetter with the RunState for the next run.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface repast.simphony.parameter.ParameterSetter
atEnd, next, reset
-
-
-
-
Method Detail
-
init
public void init(RunState state)
Initializes this CustomParameterSetter with the RunState for the next run.- Parameters:
state
- the RunState for the next run.
-
getName
public String getName()
Gets the name of the parameter this setter will set.- Returns:
- the name of the parameter this setter will set.
-
getParameterType
public Class getParameterType()
Gets the class of the parameter this setter will set.- Returns:
- the class of the parameter this setter will set.
-
addParameters
public abstract void addParameters(ParametersCreator creator)
Adds the parameters that this class is responsible for to the ParametersCreator factory. For example, a CustomParameterSetter will create the parameter that is directly responsible for setting (the one specified by the name property) and may create a derived parameter that is also set by this CustomParameterSetter.- Parameters:
creator
- the factory used to create the parameters that this class manages
-
-