Class LogicalFilter.Or<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.Or<R> extends LogicalFilter<R>
The "Or" operation (⋁).
  • Field Details

    • serialVersionUID

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

    • Or

      Or(Collection<? extends Filter<? super R>> op)
      Creates a new operator for the given operands.
    • Or

      Or(Filter<? super R> operand1, Filter<? super R> operand2)
      Creates a new operator for the two given operands.
  • Method Details

    • createSameType

      protected LogicalFilter<R> createSameType(Collection<? extends Filter<? super R>> op)
      Creates a new logical operator of the same kind than this operator.
      Specified by:
      createSameType in class LogicalFilter<R>
      Parameters:
      op - operands of the new operator.
      Returns:
      the new operator.
    • getOperatorType

      public LogicalOperatorName getOperatorType()
      Identification of the operation.
      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.
    • test

      public boolean test(R object)
      Executes the logical operation.
      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.
      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.