|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mitre.sim.api3.Trigger
Abstract class used to create all simulation developer defined triggers.
Copyright © 2003-2004 The MITRE Corporation
Constructor Summary | |
Trigger()
|
Method Summary | |
void |
action()
Override this method if a trigger-specific action is needed. |
abstract boolean |
condition()
Decision logic of the trigger. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Trigger()
Method Detail |
public abstract boolean condition()
trigger
are
used by simulation developers to detect changes in the simulation environment
and trigger action in their entities. Triggers
are used
to wake up entities whose agendas
are suspended in a call to
waitForActionOrTrigger
.
The simulation executive may invoke this
method an undetermined number of times. As a result, evaluation of the
condition
method should have no side effect in the simulation.
Entity.waitForActionOrTrigger(Trigger[] cs, double backStop)
public void action()
condition()
method returns true
,
and the entity changes state from
waitingForEvent
to
ready
. That is, when this
trigger
causes an entity to resume.
Method action()
only gets invoked once when the state change
occures but the executive may call method condition()
repeatedly.
public java.lang.String toString()
Trigger
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |