Interface DoublePredicate

All Superinterfaces:
DoublePredicate

public interface DoublePredicate extends DoublePredicate
An enhanced double predicate.
Author:
Paul Ferraro
  • Field Details

    • ALWAYS

      static final DoublePredicate ALWAYS
      A predicate that always returns true
    • NEVER

      static final DoublePredicate NEVER
      A predicate that always returns false
    • POSITIVE

      static final DoublePredicate POSITIVE
      A predicate that returns true if its parameter is greater than zero.
    • ZERO

      static final DoublePredicate ZERO
      A predicate that returns true if its parameter is zero.
    • NEGATIVE

      static final DoublePredicate NEGATIVE
      A predicate that returns true if its parameter is less than zero.
  • Method Details

    • compose

      default <V> Predicate<V> compose(ToDoubleFunction<V> function)
      Returns a predicate that applies the specified function to its argument before evaluating.
      Type Parameters:
      V - the mapped type
      Parameters:
      function - a mapping function
      Returns:
      a mapped predicate
    • composeDouble

      default DoublePredicate composeDouble(DoubleUnaryOperator function)
      Returns a predicate that applies the specified function to its argument before evaluating.
      Parameters:
      function - a mapping operator
      Returns:
      a mapped predicate
    • composeInt

      default IntPredicate composeInt(IntToDoubleFunction function)
      Returns a predicate that applies the specified function to its argument before evaluating.
      Parameters:
      function - a mapping function
      Returns:
      a mapped predicate
    • composeLong

      default LongPredicate composeLong(LongToDoubleFunction function)
      Returns a predicate that applies the specified function to its argument before evaluating.
      Parameters:
      function - a mapping function
      Returns:
      a mapped predicate
    • and

      default DoublePredicate and(DoublePredicate other)
      Specified by:
      and in interface DoublePredicate
    • negate

      default DoublePredicate negate()
      Specified by:
      negate in interface DoublePredicate
    • or

      default DoublePredicate or(DoublePredicate other)
      Specified by:
      or in interface DoublePredicate
    • xor

      default DoublePredicate xor(DoublePredicate other)
      Returns a predicate returning the exclusive disjunction of this predicate with the specified predicate.
      Parameters:
      other - another predicate
      Returns:
      a predicate returning the exclusive disjunction of this predicate with the specified predicate.
    • of

      static DoublePredicate of(boolean result)
      Returns a predicate that always evaluates to the specified result.
      Parameters:
      result - the fixed result
      Returns:
      a predicate that always evaluates to the specified value.
    • of

      static DoublePredicate of(DoubleConsumer consumer, BooleanSupplier supplier)
      Returns a predicate that accepts its parameter via the specified consumer and returns the result of the specified supplier.
      Parameters:
      consumer - the predicate parameter consumer
      supplier - the predicate result supplier
      Returns:
      a predicate that accepts its parameter via the specified consumer and returns the result of the specified supplier.
    • lessThan

      static DoublePredicate lessThan(double base)
      Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.
      Parameters:
      base - the comparison value
      Returns:
      a predicate that evaluates to true if and only if the argument is equals to the specified object.
    • equalTo

      static DoublePredicate equalTo(double base)
      Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.
      Parameters:
      base - the comparison value
      Returns:
      a predicate that evaluates to true if and only if the argument is equals to the specified object.
    • greaterThan

      static DoublePredicate greaterThan(double base)
      Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.
      Parameters:
      base - the comparison value
      Returns:
      a predicate that evaluates to true if and only if the argument is equals to the specified object.