org.geotools.filter
Interface BetweenFilter
- All Superinterfaces:
- CompareFilter, Filter, FilterType
- All Known Implementing Classes:
- BetweenFilterImpl
- public interface BetweenFilter
- extends CompareFilter
Defines a 'between' filter (which is a specialized compare filter). A
between filter is just shorthand for a less-than-or-equal filter ANDed with
a greater-than-or-equal filter. Arguably, this would be better handled
using those constructs, but the OGC filter specification creates its own
object for this, so we do as well. An important note here is that a
between filter is actually a math filter, so its outer (left and right)
expressions must be math expressions. This is enforced by the
FilterAbstract class, which considers a BETWEEN operator to be a math
filter.
- Version:
- $Id: BetweenFilter.java,v 1.3 2003/08/07 19:55:21 cholmesny Exp $
- Author:
- Rob Hranac, TOPP
Fields inherited from interface org.geotools.filter.Filter |
ALL, NONE |
Fields inherited from interface org.geotools.filter.FilterType |
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, NULL |
contains
public boolean contains(Feature feature)
- Determines whether or not a given feature is 'inside' this filter.
- Specified by:
contains
in interface CompareFilter
- Parameters:
feature
- Specified feature to examine.
- Returns:
- Whether or not this feature is inside the filter.
getMiddleValue
public Expression getMiddleValue()
- Gets the middle value of the between. Should generally be an
AttributeExpression: 1 <= area <= 200 makes sense,
1 <= 200 <= area should just use a less-than-or-equal filter.
- Returns:
- the expression in the middle.
addMiddleValue
public void addMiddleValue(Expression middleValue)
- Sets the values to be compared as between the left and right values.
- Parameters:
middleValue
- The expression to be compared.- Task:
- REVISIT: rename to setMiddleValue? You can't have more than 1.
Copyright © GeoTools. All Rights Reserved.