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.MatchActionmatchAction-
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 protectedIsBetweenImpl(Expression lower, Expression expression, Expression upper)protectedIsBetweenImpl(Expression lower, Expression expression, Expression upper, MultiValuedFilter.MatchAction matchAction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectaccept(FilterVisitor visitor, Object extraData)Used by FilterVisitors to perform some action on this filter instance.booleanequals(Object obj)Compares this filter to the specified object.booleanevaluate(Object feature)Give an object, this method determines if the test(s) represented by this filter object are passed.booleanevaluateInternal(Object value, Object lower, Object upper)ExpressiongetExpression()Returns the expression to be compared by this operator.ExpressiongetLowerBoundary()Returns the lower bounds (inclusive) an an expression.MultiValuedFilter.MatchActiongetMatchAction()* 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?ExpressiongetUpperBoundary()Returns the upper bounds (inclusive) as an expression.inthashCode()Override of hashCode method.voidsetExpression(Expression expression)voidsetLowerBoundary(Expression lowerBoundary)voidsetUpperBoundary(Expression upperBoundary)StringtoString()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:PropertyIsBetweenReturns the expression to be compared by this operator.- Specified by:
getExpressionin 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:
getMatchActionin interfaceMultiValuedFilter- Overrides:
getMatchActionin classBinaryComparisonAbstract- Returns:
- MatchAction flag
-
evaluate
public boolean evaluate(Object feature)
Description copied from interface:FilterGive 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:CompareFilterImplUsed 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:
acceptin interfaceFilter- Specified by:
acceptin 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:PropertyIsBetweenReturns the lower bounds (inclusive) an an expression.- Specified by:
getLowerBoundaryin interfacePropertyIsBetween
-
setLowerBoundary
public void setLowerBoundary(Expression lowerBoundary)
-
getUpperBoundary
public Expression getUpperBoundary()
Description copied from interface:PropertyIsBetweenReturns the upper bounds (inclusive) as an expression.- Specified by:
getUpperBoundaryin interfacePropertyIsBetween
-
setUpperBoundary
public void setUpperBoundary(Expression upperBoundary)
-
toString
public String toString()
Description copied from class:CompareFilterImplReturns a string representation of this filter.- Overrides:
toStringin classCompareFilterImpl- Returns:
- String representation of the compare filter.
-
hashCode
public int hashCode()
Description copied from class:CompareFilterImplOverride of hashCode method.- Overrides:
hashCodein classCompareFilterImpl- Returns:
- a code to hash this object by.
-
equals
public boolean equals(Object obj)
Description copied from class:CompareFilterImplCompares 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:
equalsin classCompareFilterImpl- Parameters:
obj- - the object to compare this CompareFilter against.- Returns:
- true if specified object is equal to this filter; false otherwise.
-
-