net.esper.pattern
Class EvalNode

java.lang.Object
  extended by net.esper.pattern.EvalNode
Direct Known Subclasses:
EvalAndNode, EvalEveryNode, EvalFilterNode, EvalFollowedByNode, EvalGuardNode, EvalNotNode, EvalObserverNode, EvalOrNode, EvalRootNode

public abstract class EvalNode
extends java.lang.Object

Superclass of all nodes in an evaluation tree representing an event pattern expression. Follows the Composite pattern. Child nodes do not carry references to parent nodes, the tree is unidirectional.


Method Summary
 void addChildNode(EvalNode childNode)
          Adds a child node.
 void dumpDebug(java.lang.String prefix)
          Recursively print out all nodes.
 java.util.LinkedList<EvalNode> getChildNodes()
          Returns list of child nodes.
abstract  EvalStateNode newState(Evaluator parentNode, MatchedEventMap beginState, PatternContext context)
          Create the evaluation state node containing the truth value state for each operator in an event expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newState

public abstract EvalStateNode newState(Evaluator parentNode,
                                       MatchedEventMap beginState,
                                       PatternContext context)
Create the evaluation state node containing the truth value state for each operator in an event expression.

Parameters:
parentNode - is the parent evaluator node that this node indicates a change in truth value to
beginState - is the container for events that makes up the start state
context - is the handle to services required for evaluation
Returns:
state node containing the truth value state for the operator

addChildNode

public final void addChildNode(EvalNode childNode)
Adds a child node.

Parameters:
childNode - is the child evaluation tree node to add

getChildNodes

public final java.util.LinkedList<EvalNode> getChildNodes()
Returns list of child nodes.

Returns:
list of child nodes

dumpDebug

public final void dumpDebug(java.lang.String prefix)
Recursively print out all nodes.

Parameters:
prefix - is printed out for naming the printed info