public abstract class WakeupCriterion extends WakeupCondition
Note that a unique WakeupCriterion object must be used with each instance of a Behavior. Sharing wakeup criteria among different instances of a Behavior is illegal. Similarly, a unique WakeupCriterion object must be used for each individual element in the set of arrays used to construct WakeupOr, WakeupAnd, WakeupOrOfAnds, and WakeupAndOfOrs objects.
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
triggered
Flag specifying whether this criterion triggered a wakeup
|
ALL_ELEMENTS, allEnum, behav, conditionMet, id, listIdx, parent, trigEnum, TRIGGERED_ELEMENTS| Constructor and Description |
|---|
WakeupCriterion() |
| Modifier and Type | Method and Description |
|---|---|
(package private) abstract void |
addBehaviorCondition(BehaviorStructure bs)
This is a callback from BehaviorStructure.
|
(package private) void |
buildTree(WakeupCondition parent,
int id,
BehaviorRetained b)
Initialize And/Or tree and add criterion to the BehaviourStructure.
|
(package private) void |
cleanTree(BehaviorStructure bs)
This goes through the AndOr tree to remove the various criterion from the
BehaviorStructure.
|
boolean |
hasTriggered()
Returns true if this criterion triggered the wakeup.
|
(package private) abstract void |
removeBehaviorCondition(BehaviorStructure bs)
This is a callback from BehaviorStructure.
|
(package private) abstract void |
resetBehaviorCondition(BehaviorStructure bs)
It is used reset wakeupCondition when it is reused.
|
(package private) void |
resetTree()
This goes through the AndOr tree to reset various criterion.
|
(package private) void |
setTriggered()
Set the Criterion's trigger flag to true.
|
allElements, reInsertElapseTimeCond, setConditionMet, triggeredElementspublic boolean hasTriggered()
void setTriggered()
void buildTree(WakeupCondition parent, int id, BehaviorRetained b)
buildTree in class WakeupConditionvoid cleanTree(BehaviorStructure bs)
cleanTree in class WakeupConditionvoid resetTree()
resetTree in class WakeupConditionabstract void addBehaviorCondition(BehaviorStructure bs)
abstract void removeBehaviorCondition(BehaviorStructure bs)
abstract void resetBehaviorCondition(BehaviorStructure bs)
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.