org.ascape.model.rule
Class Propogate
java.lang.Object
org.ascape.model.AscapeObject
org.ascape.model.rule.Rule
org.ascape.model.rule.Propogate
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, HasName, RandomFunctions
- Direct Known Subclasses:
- PropogateScapeOnly
public class Propogate
- extends Rule
A rule that executes on the target scape, all children of the target scape,
and (if desired) all members of this or any children of the target scape. Any
scape with members active set to false will not be propagated to. If
isScapeOnly returns true, the rule will be propogated down to scapes, and
will not be executed on any non-scape member cells.
- Since:
- 1.0
- Version:
- 1.5
- Author:
- Miles Parker
- See Also:
Scape.isMembersActive()
,
Serialized Form
Constructor Summary |
Propogate(java.lang.String name)
Constructs a propogate rule with the provided name. |
Method Summary |
void |
execute(Agent agent)
Execute rule on child scapes and (optionally) agents. |
boolean |
isRandomExecution()
Returns false. |
boolean |
isScapeOnly()
Is this rule intended only to be propogated to scapes?. |
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 |
Propogate
public Propogate(java.lang.String name)
- Constructs a propogate rule with the provided name.
It is strongly encouraged to provide a name for all rules.
- Parameters:
name
- the name of this object
execute
public void execute(Agent agent)
- Execute rule on child scapes and (optionally) agents.
- Specified by:
execute
in class Rule
- Parameters:
agent
- the target agent
isScapeOnly
public boolean isScapeOnly()
- Is this rule intended only to be propogated to scapes?.
- Returns:
- true, if is scape only
isRandomExecution
public boolean isRandomExecution()
- Returns false. Initialization should not need to be random, since it
should not depend on the state of any other agent.
- Overrides:
isRandomExecution
in class Rule
- Returns:
- true, if is random execution
Copyright © 1998-2008 The Brookings Institution, NuTech Solutions, Metascape, LLC All Rights Reserved.