org.deegree.filter.comparison
Class BinaryComparisonOperator

java.lang.Object
  extended by org.deegree.filter.comparison.ComparisonOperator
      extended by org.deegree.filter.comparison.BinaryComparisonOperator
All Implemented Interfaces:
Operator
Direct Known Subclasses:
PropertyIsEqualTo, PropertyIsGreaterThan, PropertyIsGreaterThanOrEqualTo, PropertyIsLessThan, PropertyIsLessThanOrEqualTo, PropertyIsNotEqualTo

public abstract class BinaryComparisonOperator
extends ComparisonOperator

Abstract base class for all binary comparison operators.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider, last edited by: $Author:$

Nested Class Summary
 
Nested classes/interfaces inherited from class org.deegree.filter.comparison.ComparisonOperator
ComparisonOperator.SubType
 
Nested classes/interfaces inherited from interface org.deegree.filter.Operator
Operator.Type
 
Field Summary
protected  Expression param1
           
protected  Expression param2
           
 
Fields inherited from class org.deegree.filter.comparison.ComparisonOperator
matchAction, matchCase
 
Constructor Summary
protected BinaryComparisonOperator(Expression param1, Expression param2, Boolean matchCase, MatchAction matchAction)
           
 
Method Summary
protected abstract  boolean compare(PrimitiveValue param1, PrimitiveValue param2)
           
<T> boolean
evaluate(T obj, XPathEvaluator<T> xpathEvaluator)
          Determines the value of the boolean operator.
 Expression getParameter1()
           
 Expression getParameter2()
           
 Expression[] getParams()
           
 
Methods inherited from class org.deegree.filter.comparison.ComparisonOperator
checkComparableOrNull, getMatchAction, getPrimitiveValues, getSubType, getType, isMatchCase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deegree.filter.Operator
toString
 

Field Detail

param1

protected final Expression param1

param2

protected final Expression param2
Constructor Detail

BinaryComparisonOperator

protected BinaryComparisonOperator(Expression param1,
                                   Expression param2,
                                   Boolean matchCase,
                                   MatchAction matchAction)
Method Detail

getParameter1

public Expression getParameter1()

getParameter2

public Expression getParameter2()

getParams

public Expression[] getParams()
Specified by:
getParams in class ComparisonOperator

evaluate

public <T> boolean evaluate(T obj,
                            XPathEvaluator<T> xpathEvaluator)
                 throws FilterEvaluationException
Description copied from interface: Operator
Determines the value of the boolean operator.

Type Parameters:
T - type of the context object
Parameters:
obj - object that the operator is evaluated upon, must not be null
xpathEvaluator - used for evaluation of XPath expressions, must not be null
Returns:
true, if the operator evaluates to true, false otherwise
Throws:
FilterEvaluationException - if the evaluation fails

compare

protected abstract boolean compare(PrimitiveValue param1,
                                   PrimitiveValue param2)


Copyright © 2011. All Rights Reserved.