Interface LongPredicate

All Superinterfaces:
LongPredicate

public interface LongPredicate extends LongPredicate
An enhanced long predicate.
Author:
Paul Ferraro
  • Field Details

    • ALWAYS

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

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

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

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

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

    • compose

      default <V> Predicate<V> compose(ToLongFunction<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(DoubleToLongFunction function)
      Returns a predicate that applies the specified function to its argument before evaluating.
      Parameters:
      function - a mapping function
      Returns:
      a mapped predicate
    • composeInt

      default IntPredicate composeInt(IntToLongFunction 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(LongUnaryOperator 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 LongPredicate and(LongPredicate other)
      Specified by:
      and in interface LongPredicate
    • negate

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

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

      default LongPredicate xor(LongPredicate 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 LongPredicate 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 LongPredicate of(LongConsumer 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 LongPredicate lessThan(long 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 LongPredicate equalTo(long 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 LongPredicate greaterThan(long 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.