org.deegree.filter.logical
Class Or

java.lang.Object
  extended by org.deegree.filter.logical.LogicalOperator
      extended by org.deegree.filter.logical.Or
All Implemented Interfaces:
Operator

public class Or
extends LogicalOperator

The API for the Or logical operator. For the schema model, see http://schemas.opengis.net/filter/1.1.0/filter.xsd

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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.deegree.filter.logical.LogicalOperator
LogicalOperator.SubType
 
Nested classes/interfaces inherited from interface org.deegree.filter.Operator
Operator.Type
 
Constructor Summary
Or(Operator... paramsArray)
          Creates an Or operator by providing an arbitrary number of parameters
 
Method Summary
<T> boolean
evaluate(T obj, XPathEvaluator<T> xpathEvaluator)
          Determines the value of the boolean operator.
 Operator getParameter(int n)
           
 Operator[] getParams()
           
 int getSize()
          Return the number of parameters in the Or operator
 LogicalOperator.SubType getSubType()
           
 String toString(String indent)
           
 
Methods inherited from class org.deegree.filter.logical.LogicalOperator
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Or

public Or(Operator... paramsArray)
   throws IllegalArgumentException
Creates an Or operator by providing an arbitrary number of parameters

Parameters:
paramsArray - an arbitrary number of parameters
Throws:
IllegalArgumentException - when less than 2 parameters are provided
Method Detail

getSize

public int getSize()
Return the number of parameters in the Or operator

Returns:
the number of parameters

getParameter

public Operator getParameter(int n)
Parameters:
n - the index of the wanted argument. Starting from 0.
Returns:
returns the nth parameter of the Or operator. In order to prevent the IndexOutOfBoundsException from occurring, one can call getSize() first and check...

getSubType

public LogicalOperator.SubType getSubType()
Specified by:
getSubType in class LogicalOperator

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

toString

public String toString(String indent)

getParams

public Operator[] getParams()
Specified by:
getParams in class LogicalOperator


Copyright © 2011. All Rights Reserved.