public class EvalAndStateNode extends EvalStateNode implements Evaluator
Constructor and Description |
---|
EvalAndStateNode(Evaluator parentNode,
EvalAndNode evalAndNode)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(EvalStateNodeVisitor visitor)
Accept a visitor.
|
static void |
addMatchEvent(java.lang.Object[] eventsPerChild,
int indexFrom,
MatchedEventMap matchEvent) |
void |
evaluateFalse(EvalStateNode fromNode)
Indicate a change in truth value to false.
|
void |
evaluateTrue(MatchedEventMap matchEvent,
EvalStateNode fromNode,
boolean isQuitted)
Indicate a change in truth value to true.
|
static java.util.List<MatchedEventMap> |
generateMatchEvents(MatchedEventMap matchEvent,
java.lang.Object[] eventsPerChild,
int indexFrom)
Generate a list of matching event combinations constisting of the events per child that are passed in.
|
EvalNode |
getFactoryNode()
Returns the factory node for the state node.
|
boolean |
isFilterChildNonQuitting() |
boolean |
isFilterStateNode() |
boolean |
isNotOperator() |
void |
quit()
Stops the event expression or an instance of it.
|
void |
removeMatch(java.util.Set<EventBean> matchEvent)
Remove matches that overlap with the provided events.
|
void |
start(MatchedEventMap beginState)
Starts the event expression or an instance of it.
|
java.lang.String |
toString() |
getParentEvaluator, setParentEvaluator
public EvalAndStateNode(Evaluator parentNode, EvalAndNode evalAndNode)
parentNode
- is the parent evaluator to call to indicate truth valueevalAndNode
- is the factory node associated to the statepublic void removeMatch(java.util.Set<EventBean> matchEvent)
EvalStateNode
removeMatch
in class EvalStateNode
matchEvent
- set of events to check forpublic EvalNode getFactoryNode()
EvalStateNode
getFactoryNode
in class EvalStateNode
public final void start(MatchedEventMap beginState)
EvalStateNode
start
in class EvalStateNode
public boolean isFilterStateNode()
isFilterStateNode
in class EvalStateNode
public boolean isNotOperator()
isNotOperator
in class EvalStateNode
public boolean isFilterChildNonQuitting()
isFilterChildNonQuitting
in interface Evaluator
public final void evaluateTrue(MatchedEventMap matchEvent, EvalStateNode fromNode, boolean isQuitted)
Evaluator
evaluateTrue
in interface Evaluator
matchEvent
- is the container for events that caused the change in truth valuefromNode
- is the node that indicates the changeisQuitted
- is an indication of whether the node continues listenening or stops listeningpublic final void evaluateFalse(EvalStateNode fromNode)
Evaluator
evaluateFalse
in interface Evaluator
fromNode
- is the node that indicates the changepublic static java.util.List<MatchedEventMap> generateMatchEvents(MatchedEventMap matchEvent, java.lang.Object[] eventsPerChild, int indexFrom)
matchEvent
- can be populated with prior events that must be passed oneventsPerChild
- is the list of events for each child node to the "And" node.public final void quit()
EvalStateNode
quit
in class EvalStateNode
public final void accept(EvalStateNodeVisitor visitor)
EvalStateNode
accept
in class EvalStateNode
visitor
- on which the visit method is invoked by each nodepublic final java.lang.String toString()
toString
in class java.lang.Object
public static void addMatchEvent(java.lang.Object[] eventsPerChild, int indexFrom, MatchedEventMap matchEvent)