## org.ascape.model.rule
Class SetValues

    java.lang.Object
      org.ascape.model.AscapeObject
          org.ascape.model.rule.Rule
              org.ascape.model.rule.SetValues

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, HasName, RandomFunctions

    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
Author:
  Miles Parker
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.ascape.model.AscapeObject
`ARBITRARY_SEED, name, PLATFORM_DEFAULT_COLOR, scape`

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 org.ascape.model.rule.Rule
`getScape, isCauseRemoval, isIterateAll`

Methods inherited from class org.ascape.model.AscapeObject
`clone, diffDeep, diffDeep, diffDeepBFS, diffDeepDFS, diffDeepValidate, diffDeepVisit, equalsDeep, equalsDeep, equalsDeep, getComparisonStream, getName, getRandom, getRandomSeed, randomInRange, randomInRange, randomIs, randomToLimit, reseed, setComparisonStream, setName, setRandom, setRandomSeed, toString`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SetValues

    public SetValues()

  Construct a new setter collection rule.

Method Detail

### 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`
  Parameters:
    `scape` - the scape

### getSetters

    public ValueSetter[] getSetters()

  Returns the setters used to collect setters from the scape.

  Returns:
    the setters

### addSetters

    public void addSetters(ValueSetter[] addDataPoints)

  Adds setters to the collection rule. Typically not called directly.

  Parameters:
    `addDataPoints` - the add data points

### execute

    public void execute(Agent agent)

  Sets all values for the agent.

  Specified by:
    `execute` in class `Rule`
  Parameters:
    `agent` - the target agent.

### isRandomExecution

    public boolean isRandomExecution()

  Returns false; it doesn't matter what order we set setters in.

  Overrides:
    `isRandomExecution` in class `Rule`
  Returns:
    true, if is random execution