Interface Predicate2<T1,T2>

All Superinterfaces:
BiPredicate<T1,T2>, Serializable
All Known Implementing Classes:
CheckedPredicate2, MapEntryPredicate, PairPredicate, Predicates2
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 Predicate2<T1,T2> extends BiPredicate<T1,T2>, Serializable
A Predicate2 is primarily used in methods like selectWith, detectWith, rejectWith. The first argument is the element of the collection being iterated over, and the second argument is a parameter passed into the predicate from the calling method.
  • Method Summary

    Modifier and Type
    accept(T1 argument1, T2 argument2)
    default boolean
    test(T1 t1, T2 t2)

    Methods inherited from interface java.util.function.BiPredicate

    and, negate, or
  • Method Details

    • accept

      boolean accept(T1 argument1, T2 argument2)
    • test

      default boolean test(T1 t1, T2 t2)
      Specified by:
      test in interface BiPredicate<T1,T2>