Class ComparisonFilter.Between<R>

java.lang.Object
org.apache.sis.internal.filter.Node
org.apache.sis.filter.FilterNode<R>
org.apache.sis.filter.ComparisonFilter.Between<R>
Type Parameters:
R - the type of resources used as inputs.
All Implemented Interfaces:
Serializable, Predicate<R>, Filter<R>, BetweenComparisonOperator<R>
Enclosing class:
ComparisonFilter<R>

static final class ComparisonFilter.Between<R> extends FilterNode<R> implements BetweenComparisonOperator<R>
The "PropertyIsBetween" filter. This can be seen as a specialization of LogicalFilter.And when one expression is ComparisonFilter.LessThanOrEqualTo and a second expression is ComparisonFilter.GreaterThanOrEqualTo.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getOperatorType

      public ComparisonOperatorName getOperatorType()
      Description copied from interface: Filter
      Returns the nature of the operator.
      Specified by:
      getOperatorType in interface Filter<R>
      Returns:
      the nature of this operator.
    • getChildren

      protected Collection<?> getChildren()
      Returns the 3 children of this node. Since lower.expression2 is the same as upper.expression1, that repetition is omitted.
      Specified by:
      getChildren in class Node
      Returns:
      the children of this node, or an empty collection if none.
    • getExpressions

      public List<Expression<? super R,?>> getExpressions()
      Returns the expression to be compared by this operator, together with boundaries.
      Specified by:
      getExpressions in interface Filter<R>
      Returns:
      the expressions used as inputs, or an empty list if none.
    • getExpression

      public Expression<? super R,?> getExpression()
      Returns the expression to be compared.
      Specified by:
      getExpression in interface BetweenComparisonOperator<R>
    • getLowerBoundary

      public Expression<? super R,?> getLowerBoundary()
      Specified by:
      getLowerBoundary in interface BetweenComparisonOperator<R>
    • getUpperBoundary

      public Expression<? super R,?> getUpperBoundary()
      Specified by:
      getUpperBoundary in interface BetweenComparisonOperator<R>
    • test

      public boolean test(R object)
      Executes the filter operation.
      Specified by:
      test in interface Filter<R>
      Specified by:
      test in interface Predicate<R>
      Parameters:
      object - the object (often a Feature instance) to evaluate.
      Returns:
      true if the test(s) are passed for the provided object.