Package org.geotools.filter
Class BinaryComparisonAbstract
Object
FilterAbstract
AbstractFilter
BinaryComparisonAbstract
- All Implemented Interfaces:
Filter
,MultiValuedFilter
,FilterType
- Direct Known Subclasses:
CompareFilterImpl
,GeometryFilterImpl
Abstract implementation for binary filters.
This implementation gathers up expression1, expression2 and match action support.
For the SAX parsers setExpression1 and setExpression2 can be used to fill in the filter after creation. Everyone else is asked to treat the filter as immutable and use the appropriate FilterFactory creation method.
- Author:
- Justin Deoliveira (Boundless)
-
Nested Class Summary
Nested classes/interfaces inherited from interface MultiValuedFilter
MultiValuedFilter.MatchAction
-
Field Summary
FieldsFields inherited from class AbstractFilter
LOGGER
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
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
No argument constructor for use by SAX parsers.protected
BinaryComparisonAbstract
(Expression expression1, Expression expression2) Immutable constructor for use by FilterFactoryprotected
BinaryComparisonAbstract
(Expression expression1, Expression expression2, boolean matchingCase) Immutable constructor for use by FilterFactory -
Method Summary
Modifier and TypeMethodDescriptionprotected final Comparable
comparable
(Object value) Wraps an object in a Comparable.protected Object[]
Convenience method which evaluates the expressions and trys to align the values to be of the same type.protected Object[]
Convenience method which evaluates the expressions and trys to align the values to be of the same type.* 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?boolean
void
setExpression1
(Expression expression) void
setExpression2
(Expression expression) Methods inherited from class AbstractFilter
isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter
Methods inherited from class FilterAbstract
accepts, eval, eval
-
Field Details
-
expression1
-
expression2
-
-
Constructor Details
-
BinaryComparisonAbstract
protected BinaryComparisonAbstract()No argument constructor for use by SAX parsers. -
BinaryComparisonAbstract
Immutable constructor for use by FilterFactory -
BinaryComparisonAbstract
protected BinaryComparisonAbstract(Expression expression1, Expression expression2, boolean matchingCase) Immutable constructor for use by FilterFactory
-
-
Method Details
-
getExpression1
-
setExpression1
-
getExpression2
-
setExpression2
-
isMatchingCase
public boolean isMatchingCase() -
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
- Returns:
- MatchAction flag
-
eval
Convenience method which evaluates the expressions and trys to align the values to be of the same type.If the values can not be aligned, the original values are returned.
-
eval
Convenience method which evaluates the expressions and trys to align the values to be of the same type.If the values can not be aligned, the original values are returned.
-
comparable
Wraps an object in a Comparable.- Parameters:
value
- The original value.- Returns:
- A comparable
-