Class StreamEvaluator
java.lang.Object
com.singularsys.extensions.stream.StreamEvaluator
- All Implemented Interfaces:
Evaluator,JepComponent,Serializable
An evaluator that works with stream converting the
final result of
evaluate(Node) to a list.
It also clears the clones created by StreamClone after each evaluation
by calling StreamListProcessor.clearClones().- See Also:
-
Constructor Details
-
StreamEvaluator
Decorator constructor- Parameters:
base- evaluator for most calculations
-
-
Method Details
-
init
Description copied from interface:JepComponentInitialize the component. This method is called whenever a component is added to Jep. Hence, it allows components to keep track of the other components they may rely on.- Specified by:
initin interfaceJepComponent- Parameters:
jep- the current Jep instance
-
getLightWeightInstance
Description copied from interface:JepComponentGets a light-weight instance suitable for using in multiple threads.- Specified by:
getLightWeightInstancein interfaceJepComponent- Returns:
- either a new instance, null or 'this'.
-
evaluate
Evaluate the node- Specified by:
evaluatein interfaceEvaluator- Parameters:
node- the expression tree- Returns:
- if the base result is a stream convert it to a list otherwise return the base result
- Throws:
EvaluationException- if errors occur during evaluation;
-
eval
Evaluate the node- Specified by:
evalin interfaceEvaluator- Parameters:
node- the expression tree- Returns:
- the base result, may return a stream
- Throws:
EvaluationException- if errors occur during evaluation;
-
getBase
-