Package repast.simphony.parameter.groovy
Class CustomParameterSetter
java.lang.Object
repast.simphony.parameter.groovy.CustomParameterSetter
- All Implemented Interfaces:
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 their
next
etc. code.- Author:
- Nick Collier
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
CustomParameterSetter
(String name, Class parameterType) Construct a CustomParameterSetter. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
addParameters
(ParametersCreator creator) Adds the parameters that this class is responsible for to the ParametersCreator factory.getName()
Gets the name of the parameter this setter will set.Gets the class of the parameter this setter will set.void
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
-
Field Details
-
name
-
type
-
runState
-
-
Constructor Details
-
CustomParameterSetter
Construct a CustomParameterSetter.- Parameters:
name
- the name of the parameter this setter will setparameterType
- the type of the parameter this setter will set
-
-
Method Details
-
init
Initializes this CustomParameterSetter with the RunState for the next run.- Parameters:
state
- the RunState for the next run.
-
getName
Gets the name of the parameter this setter will set.- Returns:
- the name of the parameter this setter will set.
-
getParameterType
Gets the class of the parameter this setter will set.- Returns:
- the class of the parameter this setter will set.
-
addParameters
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
-