Interface IntPredicate

All Superinterfaces:
IntPredicate

public interface IntPredicate extends IntPredicate
An enhanced integer predicate.
Author:
Paul Ferraro
  • Field Details

    • ALWAYS

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

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

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

      static final IntPredicate ZERO
      A predicate that returns true if the parameter is zero.
    • NEGATIVE

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

    • compose

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

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

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

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

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

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

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

      default IntPredicate xor(IntPredicate 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 IntPredicate 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 IntPredicate of(IntConsumer 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 IntPredicate lessThan(int 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 IntPredicate equalTo(int 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 IntPredicate greaterThan(int 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.