Package org.apache.sis.filter
Interface Filter<R>
- All Superinterfaces:
Predicate<R>
- All Known Subinterfaces:
BetweenComparisonOperator<R>,BinaryComparisonOperator<R>,LogicalOperator<R>,Optimization.OnFilter<R>
- All Known Implementing Classes:
BinaryGeometryFilter,BinarySpatialFilter,ComparisonFilter,ComparisonFilter.Between,ComparisonFilter.EqualTo,ComparisonFilter.GreaterThan,ComparisonFilter.GreaterThanOrEqualTo,ComparisonFilter.LessThan,ComparisonFilter.LessThanOrEqualTo,ComparisonFilter.NotEqualTo,DistanceFilter,FilterLiteral,FilterNode,IdentifierFilter,LikeFilter,LogicalFilter,LogicalFilter.And,LogicalFilter.Not,LogicalFilter.Or,TemporalFilter,TemporalFilter.After,TemporalFilter.AnyInteracts,TemporalFilter.Before,TemporalFilter.Begins,TemporalFilter.BegunBy,TemporalFilter.Contains,TemporalFilter.During,TemporalFilter.EndedBy,TemporalFilter.Ends,TemporalFilter.Equals,TemporalFilter.Meets,TemporalFilter.MetBy,TemporalFilter.OverlappedBy,TemporalFilter.Overlaps,UnaryFunction.IsNil,UnaryFunction.IsNull
Identification of a subset of resources from a collection of resources
whose property values satisfy a set of logically connected predicates.
Upcoming API change
This is a placeholder for a GeoAPI 3.1 interface not yet released. In a future version, all usages of this interface may be replaced by an interface of the same name but in the
This is a placeholder for a GeoAPI 3.1 interface not yet released. In a future version, all usages of this interface may be replaced by an interface of the same name but in the
org.opengis.filter package
instead of org.apache.sis.filter.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <R> Filter<R>exclude()A filter that always evaluates tofalse.List<Expression<? super R,?>> Returns the expressions used as arguments for this filter.Enum<?>Returns the nature of the operator.static <R> Filter<R>include()A filter that always evaluates totrue.booleanGiven an object, determines if the test(s) represented by this filter are passed.
-
Method Details
-
include
A filter that always evaluates totrue.- Type Parameters:
R- the type of resources to filter.- Returns:
- the "no filtering" filter.
-
exclude
A filter that always evaluates tofalse.- Type Parameters:
R- the type of resources to filter.- Returns:
- the "exclude all" filter.
-
getOperatorType
Enum<?> getOperatorType()Returns the nature of the operator.- Returns:
- the nature of this operator.
-
getExpressions
List<Expression<? super R,?>> getExpressions()Returns the expressions used as arguments for this filter.- Returns:
- the expressions used as inputs, or an empty list if none.
-
test
Given an object, determines if the test(s) represented by this filter are passed.- Specified by:
testin interfacePredicate<R>- Parameters:
object- the object (often aFeatureinstance) to evaluate.- Returns:
trueif the test(s) are passed for the provided object.- Throws:
NullPointerException- ifobjectis null.IllegalArgumentException- if the filter can not be applied on the given object.
-