Class ComparisonFilter.EqualTo<R>

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

static final class ComparisonFilter.EqualTo<R> extends ComparisonFilter<R>
The "PropertyIsEqualTo" (=) filter.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility during (de)serialization.
      See Also:
  • Constructor Details

    • EqualTo

      EqualTo(Expression<? super R,?> expression1, Expression<? super R,?> expression2, boolean isMatchingCase, MatchAction matchAction)
      Creates a new filter.
  • Method Details

    • recreate

      public Filter<R> recreate(Expression<? super R,?>[] effective)
      Creates a new filter of the same type but different parameters.
      Parameters:
      effective - the expressions to use as a replacement of this filter expressions.
      Returns:
      the new filter, or this if unsupported.
    • getOperatorType

      public ComparisonOperatorName getOperatorType()
      Identification of the this operation.
      Returns:
      the nature of this operator.
    • symbol

      protected char symbol()
      Description copied from class: Node
      Returns the mathematical symbol for this binary function. For comparison operators, the symbol should be one of < > ≤ ≥ = ≠. For arithmetic operators, the symbol should be one of + − × ÷.
      Overrides:
      symbol in class Node
      Returns:
      the mathematical symbol, or 0 if none.
    • fromCompareTo

      protected boolean fromCompareTo(int result)
      Converts Comparable.compareTo(Object) result to this filter result.
      Specified by:
      fromCompareTo in class ComparisonFilter<R>
    • applyAsDouble

      protected Number applyAsDouble(double left, double right)
      Performs the comparison and returns the result as 0 (false) or 1 (true).
      Overrides:
      applyAsDouble in class BinaryFunction<R,Object,Object>
    • applyAsLong

      protected Number applyAsLong(long left, long right)
      Description copied from class: BinaryFunction
      Calculates this function using given operands of long primitive type. If this function is a filter, then this method should returns an Integer value 0 or 1 for false or true respectively. Otherwise the result is usually a Long, except for division which may produce other types. This method may return null if the operation cannot apply on numbers.
      Overrides:
      applyAsLong in class BinaryFunction<R,Object,Object>
    • compare

      protected boolean compare(OffsetTime left, OffsetTime right)
      Description copied from class: ComparisonFilter
      Compares two times with time-zone information. Implementations shall not use compareTo(…) because that method compares more information than desired in order to ensure consistency with equals(…).
      Specified by:
      compare in class ComparisonFilter<R>
    • compare

      protected boolean compare(OffsetDateTime left, OffsetDateTime right)
      Description copied from class: ComparisonFilter
      Compares two dates with time-zone information. Implementations shall not use compareTo(…) because that method compares more information than desired in order to ensure consistency with equals(…).
      Specified by:
      compare in class ComparisonFilter<R>
    • compare

      protected boolean compare(ChronoLocalDate left, ChronoLocalDate right)
      Description copied from class: ComparisonFilter
      Compares two dates without time-of-day and time-zone information. Implementations shall not use compareTo(…) because that method also compares chronology, which is not desired for the purpose of "is before" or "is after" comparison functions.
      Specified by:
      compare in class ComparisonFilter<R>
    • compare

      protected boolean compare(ChronoLocalDateTime<?> left, ChronoLocalDateTime<?> right)
      Description copied from class: ComparisonFilter
      Compares two dates without time-zone information. Implementations shall not use compareTo(…) because that method also compares chronology, which is not desired for the purpose of "is before" or "is after" comparison functions.
      Specified by:
      compare in class ComparisonFilter<R>
    • compare

      protected boolean compare(ChronoZonedDateTime<?> left, ChronoZonedDateTime<?> right)
      Description copied from class: ComparisonFilter
      Compares two dates with time-zone information. Implementations shall not use compareTo(…) because that method also compares chronology, which is not desired for the purpose of "is before" or "is after" comparison functions.
      Specified by:
      compare in class ComparisonFilter<R>