Package org.geotools.filter
Class IsBetweenImpl
-
- All Implemented Interfaces:
Filter
,MultiValuedFilter
,PropertyIsBetween
,FilterType
public class IsBetweenImpl extends CompareFilterImpl implements PropertyIsBetween
Straight implementation of GeoAPI interface.- Author:
- Justin Deoliveira, The Open Planning Project
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface MultiValuedFilter
MultiValuedFilter.MatchAction
-
-
Field Summary
Fields Modifier and Type Field Description protected MultiValuedFilter.MatchAction
matchAction
-
Fields inherited from class BinaryComparisonAbstract
expression1, expression2
-
Fields inherited from interface FilterType
ALL, BETWEEN, COMPARE_EQUALS, COMPARE_GREATER_THAN, COMPARE_GREATER_THAN_EQUAL, COMPARE_LESS_THAN, COMPARE_LESS_THAN_EQUAL, COMPARE_NOT_EQUALS, FID, GEOMETRY_BBOX, GEOMETRY_BEYOND, GEOMETRY_CONTAINS, GEOMETRY_CROSSES, GEOMETRY_DISJOINT, GEOMETRY_DWITHIN, GEOMETRY_EQUALS, GEOMETRY_INTERSECTS, GEOMETRY_OVERLAPS, GEOMETRY_TOUCHES, GEOMETRY_WITHIN, LIKE, LOGIC_AND, LOGIC_NOT, LOGIC_OR, NONE, NULL
-
Fields inherited from interface PropertyIsBetween
NAME
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
IsBetweenImpl(Expression lower, Expression expression, Expression upper)
protected
IsBetweenImpl(Expression lower, Expression expression, Expression upper, MultiValuedFilter.MatchAction matchAction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
accept(FilterVisitor visitor, Object extraData)
Used by FilterVisitors to perform some action on this filter instance.boolean
equals(Object obj)
Compares this filter to the specified object.boolean
evaluate(Object feature)
Give an object, this method determines if the test(s) represented by this filter object are passed.boolean
evaluateInternal(Object value, Object lower, Object upper)
Expression
getExpression()
Returns the expression to be compared by this operator.Expression
getLowerBoundary()
Returns the lower bounds (inclusive) an an expression.MultiValuedFilter.MatchAction
getMatchAction()
* Flag Controlling MatchAction property When one or more of the operands evaluates to multiple values rather than a single value, which action should be taken?Expression
getUpperBoundary()
Returns the upper bounds (inclusive) as an expression.int
hashCode()
Override of hashCode method.void
setExpression(Expression expression)
void
setLowerBoundary(Expression lowerBoundary)
void
setUpperBoundary(Expression upperBoundary)
String
toString()
Returns a string representation of this filter.-
Methods inherited from class CompareFilterImpl
compare, setExpression1, setExpression2
-
Methods inherited from class BinaryComparisonAbstract
comparable, eval, eval, getExpression1, getExpression2, isMatchingCase
-
Methods inherited from class AbstractFilter
isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter
-
Methods inherited from class FilterAbstract
accepts, eval, eval
-
-
-
-
Field Detail
-
matchAction
protected MultiValuedFilter.MatchAction matchAction
-
-
Constructor Detail
-
IsBetweenImpl
protected IsBetweenImpl(Expression lower, Expression expression, Expression upper, MultiValuedFilter.MatchAction matchAction)
-
IsBetweenImpl
protected IsBetweenImpl(Expression lower, Expression expression, Expression upper)
-
-
Method Detail
-
getExpression
public Expression getExpression()
Description copied from interface:PropertyIsBetween
Returns the expression to be compared by this operator.- Specified by:
getExpression
in interfacePropertyIsBetween
-
setExpression
public void setExpression(Expression expression)
-
getMatchAction
public MultiValuedFilter.MatchAction getMatchAction()
Description copied from interface:MultiValuedFilter
* Flag Controlling MatchAction property When one or more of the operands evaluates to multiple values rather than a single value, which action should be taken? If there are n values for the left operand and m values for the right operand, there are n * m possible combinations that can be compared,ANY - if any of the possible combinations match, the result is true (aggregated OR) ALL - only if all of the possible combinations match, the result is true (aggregated AND) ONE - only if exactly one of the possible combinations match, the result is true (aggregated XOR)
- Specified by:
getMatchAction
in interfaceMultiValuedFilter
- Overrides:
getMatchAction
in classBinaryComparisonAbstract
- Returns:
- MatchAction flag
-
evaluate
public boolean evaluate(Object feature)
Description copied from interface:Filter
Give an object, this method determines if the test(s) represented by this filter object are passed.This ability is used to allow Queries against both Features and and non spatial data (such as Record) and to express constraints on permissable data values.
-
accept
public Object accept(FilterVisitor visitor, Object extraData)
Description copied from class:CompareFilterImpl
Used by FilterVisitors to perform some action on this filter instance. Typicaly used by Filter decoders, but may also be used by any thing which needs infomration from filter structure. Implementations should always call: visitor.visit(this); It is importatant that this is not left to a parent class unless the parents API is identical.- Specified by:
accept
in interfaceFilter
- Specified by:
accept
in classCompareFilterImpl
- Parameters:
visitor
- The visitor which requires access to this filter, the method must call visitor.visit(this);
-
getLowerBoundary
public Expression getLowerBoundary()
Description copied from interface:PropertyIsBetween
Returns the lower bounds (inclusive) an an expression.- Specified by:
getLowerBoundary
in interfacePropertyIsBetween
-
setLowerBoundary
public void setLowerBoundary(Expression lowerBoundary)
-
getUpperBoundary
public Expression getUpperBoundary()
Description copied from interface:PropertyIsBetween
Returns the upper bounds (inclusive) as an expression.- Specified by:
getUpperBoundary
in interfacePropertyIsBetween
-
setUpperBoundary
public void setUpperBoundary(Expression upperBoundary)
-
toString
public String toString()
Description copied from class:CompareFilterImpl
Returns a string representation of this filter.- Overrides:
toString
in classCompareFilterImpl
- Returns:
- String representation of the compare filter.
-
hashCode
public int hashCode()
Description copied from class:CompareFilterImpl
Override of hashCode method.- Overrides:
hashCode
in classCompareFilterImpl
- Returns:
- a code to hash this object by.
-
equals
public boolean equals(Object obj)
Description copied from class:CompareFilterImpl
Compares this filter to the specified object. Returns true if the passed in object is the same as this filter. Checks to make sure the filter types are the same as well as both of the values.- Overrides:
equals
in classCompareFilterImpl
- Parameters:
obj
- - the object to compare this CompareFilter against.- Returns:
- true if specified object is equal to this filter; false otherwise.
-
-