org.araneaframework.backend.list.memorybased.expression.logical
Class InExpression

java.lang.Object
  extended byorg.araneaframework.backend.list.memorybased.expression.MultiExpression
      extended byorg.araneaframework.backend.list.memorybased.expression.logical.InExpression
All Implemented Interfaces:
CompositeExpression, Expression, Serializable

public class InExpression
extends MultiExpression

Provides the IN expression for filtering data in memory-based lists. It verifies that the value of the field is one of provided ones (case-sensitive equal).

Since:
1.1.4
Author:
Allar Tammik
See Also:
Serialized Form

Field Summary
protected  Expression expr1
          The field value expression.
 
Fields inherited from class org.araneaframework.backend.list.memorybased.expression.MultiExpression
children
 
Constructor Summary
InExpression(Expression expr1, List exprs)
           
 
Method Summary
 Object evaluate(VariableResolver resolver)
          Evaluates by verifying that the field value is one of the values in the array.
 Expression[] getChildren()
           
 
Methods inherited from class org.araneaframework.backend.list.memorybased.expression.MultiExpression
add
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

expr1

protected Expression expr1
The field value expression.

Constructor Detail

InExpression

public InExpression(Expression expr1,
                    List exprs)
Method Detail

getChildren

public Expression[] getChildren()
Specified by:
getChildren in interface CompositeExpression
Overrides:
getChildren in class MultiExpression

evaluate

public Object evaluate(VariableResolver resolver)
                throws ExpressionEvaluationException
Evaluates by verifying that the field value is one of the values in the array.

Parameters:
resolver - Resolver that is used to evalute Variables.
Returns:
the value of this Expression.
Throws:
ExpressionEvaluationException - when the evaluating fails.