Interface IntPredicate

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface IntPredicate
A test of one int; the int form of Predicate.
  • Method Summary

    Modifier and Type
    Method
    Description
    default IntPredicate
    Passes when this and other both pass; other is not asked when this fails.
    default IntPredicate
    Passes when this fails.
    default IntPredicate
    Passes when this or other passes; other is not asked when this passes.
    boolean
    test(int value)
    Whether value passes.
  • Method Details

    • test

      boolean test(int value)
      Whether value passes.
      Parameters:
      value - the input
      Returns:
      true when it passes
    • and

      default IntPredicate and(IntPredicate other)
      Passes when this and other both pass; other is not asked when this fails.
      Parameters:
      other - the second test
      Returns:
      the composed test
    • negate

      default IntPredicate negate()
      Passes when this fails.
      Returns:
      the negated test
    • or

      default IntPredicate or(IntPredicate other)
      Passes when this or other passes; other is not asked when this passes.
      Parameters:
      other - the second test
      Returns:
      the composed test