Package org.apache.sis.filter
Class IdentifierFilter<R extends AbstractFeature>
java.lang.Object
org.apache.sis.internal.filter.Node
org.apache.sis.filter.FilterNode<R>
org.apache.sis.filter.IdentifierFilter<R>
- Type Parameters:
R
- the type of resources used as inputs.
- All Implemented Interfaces:
Serializable
,Predicate<R>
,Filter<R>
Filter features using a set of predefined identifiers and discarding features
whose identifier is not in the set.
- Since:
- 1.1
- Version:
- 1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The identifier of features to retain.private static final long
For cross-version compatibility. -
Constructor Summary
ConstructorsConstructorDescriptionIdentifierFilter
(String identifier) Creates a new filter using the given identifier. -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection
<?> Returns the identifiers specified at construction time.List
<Expression<? super R, ?>> Returns the parameters of this filter.Returns the identifiers of feature instances to accept.Enum
<?> Returns the nature of the operator.boolean
Returnstrue
if the given object is aAbstractFeature
instance and its identifier is one of the identifier specified atIdentifierFilter
construction time.Methods inherited from class org.apache.sis.filter.FilterNode
and, negate, or
Methods inherited from class org.apache.sis.internal.filter.Node
createName, createType, equals, getGeometryLibrary, hashCode, symbol, toGeometryWrapper, toString, unwrap, warning
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
identifier
The identifier of features to retain.
-
-
Constructor Details
-
IdentifierFilter
IdentifierFilter(String identifier) Creates a new filter using the given identifier.
-
-
Method Details
-
getOperatorType
Description copied from interface:Filter
Returns the nature of the operator.- Returns:
- the nature of this operator.
-
getIdentifier
Returns the identifiers of feature instances to accept. -
getExpressions
Returns the parameters of this filter.- Returns:
- the expressions used as inputs, or an empty list if none.
-
getChildren
Returns the identifiers specified at construction time. This is used forNode.toString()
,Node.hashCode()
andNode.equals(Object)
implementations.- Specified by:
getChildren
in classNode
- Returns:
- the children of this node, or an empty collection if none.
-
test
Returnstrue
if the given object is aAbstractFeature
instance and its identifier is one of the identifier specified atIdentifierFilter
construction time.- Parameters:
object
- the object (often aFeature
instance) to evaluate.- Returns:
true
if the test(s) are passed for the provided object.
-