edu.brook.ascape.rule
Class SetValues
java.lang.Object
|
+--edu.brook.ascape.model.AscapeObject
|
+--edu.brook.ascape.rule.Rule
|
+--edu.brook.ascape.rule.SetValues
- public class SetValues
- extends Rule
A rule for setting values for a population of agents.
Typically this rule is iused for assigning a set of exogenous values
to a collection of agents. For instance, this ruel might be used to
set historical values each year for a group of agents in a simulation.
- Since:
- 1.0.3
- Version:
- 1.0.3
- See Also:
- Serialized Form
|
Constructor Summary |
SetValues()
Construct a new setter collection rule. |
|
Method Summary |
void |
addSetters(ValueSetter[] addDataPoints)
Adds setters to the collection rule. |
void |
execute(Agent agent)
Sets all values for the agent. |
ValueSetter[] |
getSetters()
Returns the setters used to collect setters from the scape. |
boolean |
isRandomExecution()
Returns false; it doesn't matter what order we set setters in. |
void |
setScape(Scape scape)
Sets the scape for this rule, adding any setters from the scapes prototype agent. |
| Methods inherited from class edu.brook.ascape.model.AscapeObject |
clone,
getName,
getRandom,
getRandomSeed,
randomInRange,
randomInRange,
randomIs,
randomToLimit,
reseed,
setName,
setRandom,
setRandomSeed,
toString |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
setters
protected ValueSetter[] setters
- The setters for setting data points.
SetValues
public SetValues()
- Construct a new setter collection rule.
setScape
public void setScape(Scape scape)
- Sets the scape for this rule, adding any setters from the scapes prototype agent.
- Overrides:
- setScape in class Rule
getSetters
public ValueSetter[] getSetters()
- Returns the setters used to collect setters from the scape.
addSetters
public void addSetters(ValueSetter[] addDataPoints)
- Adds setters to the collection rule. Typically not called directly.
execute
public void execute(Agent agent)
- Sets all values for the agent.
- Parameters:
agent - the target agent.- Overrides:
- execute in class Rule
isRandomExecution
public boolean isRandomExecution()
- Returns false; it doesn't matter what order we set setters in.
- Overrides:
- isRandomExecution in class Rule