sim.engine
Class RandomSequence

java.lang.Object
  extended bysim.engine.Sequence
      extended bysim.engine.RandomSequence
All Implemented Interfaces:
java.io.Serializable, Steppable

public class RandomSequence
extends Sequence

RandomSequence is a Sequence which executes its Steppable objects in random order each time. RandomSequence does not ordinarily synchronize on the random number generator -- unless you set shouldSynchronize to true. This is commonly only necessary if you're running multithreaded (you're embedded inside a ParallelSequence for example).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class sim.engine.Sequence
steps
 
Constructor Summary
RandomSequence(Steppable[] steps)
          Does not synchronize on the random number generator
RandomSequence(Steppable[] steps, boolean shouldSynchronize)
          Synchronizes on the random number generator only if shouldSynchronize is true
 
Method Summary
 void step(SimState state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomSequence

public RandomSequence(Steppable[] steps)
Does not synchronize on the random number generator


RandomSequence

public RandomSequence(Steppable[] steps,
                      boolean shouldSynchronize)
Synchronizes on the random number generator only if shouldSynchronize is true

Method Detail

step

public void step(SimState state)
Specified by:
step in interface Steppable
Overrides:
step in class Sequence