Class LogicalFilter.Not<R>

Type Parameters:
R - the type of resources used as inputs.
All Implemented Interfaces:
Serializable, Predicate<R>, Filter<R>, Optimization.OnFilter<R>, LogicalOperator<R>
Enclosing class:
LogicalFilter<R>

static final class LogicalFilter.Not<R> extends FilterNode<R> implements LogicalOperator<R>, Optimization.OnFilter<R>
The negation filter (¬).
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • operand

      private final Filter<? super R> operand
      The filter to negate.
  • Constructor Details

    • Not

      Not(Filter<? super R> operand)
      Creates a new operator.
  • Method Details

    • getOperatorType

      public LogicalOperatorName getOperatorType()
      Identification of the operation.
      Specified by:
      getOperatorType in interface Filter<R>
      Specified by:
      getOperatorType in interface LogicalOperator<R>
      Returns:
      the nature of this operator.
    • symbol

      protected char symbol()
      Symbol of the operation.
      Overrides:
      symbol in class Node
      Returns:
      the mathematical symbol, or 0 if none.
    • getChildren

      protected final Collection<?> getChildren()
      Returns the singleton expression tested by this operator.
      Specified by:
      getChildren in class Node
      Returns:
      the children of this node, or an empty collection if none.
    • getOperands

      public List<Filter<? super R>> getOperands()
      Returns the singleton filter used by this operation.
      Specified by:
      getOperands in interface LogicalOperator<R>
    • test

      public boolean test(R object)
      Evaluates this filter on the given object.
      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.
    • optimize

      public Filter<? super R> optimize(Optimization optimization)
      Tries to optimize this filter.
      Specified by:
      optimize in interface Optimization.OnFilter<R>
      Parameters:
      optimization - the simplifications or optimizations to apply on this filter.
      Returns:
      the simplified or optimized filter, or this if no optimization has been applied.