Interface BiPredicate<T,U>

Type Parameters:
T - the first parameter type
U - the second parameter type
All Superinterfaces:
BiPredicate<T,U>
All Known Implementing Classes:
BiPredicate.SimpleBiPredicate

public interface BiPredicate<T,U> extends BiPredicate<T,U>
An enhanced binary predicate.
Author:
Paul Ferraro
  • Field Details

  • Method Details

    • and

      default BiPredicate<T,U> and(BiPredicate<? super T,? super U> other)
      Specified by:
      and in interface BiPredicate<T,U>
    • negate

      default BiPredicate<T,U> negate()
      Specified by:
      negate in interface BiPredicate<T,U>
    • or

      default BiPredicate<T,U> or(BiPredicate<? super T,? super U> other)
      Specified by:
      or in interface BiPredicate<T,U>
    • reverse

      default BiPredicate<U,T> reverse()
      Returns a predicate that processes this predicate with reversed parameter order.
      Returns:
      a predicate that processes this predicate with reversed parameter order.
    • always

      static <T, U> BiPredicate<T,U> always()
      Returns a predicate that always accepts its arguments.
      Type Parameters:
      T - the first parameter type
      U - the second parameter type
      Returns:
      a predicate that always accepts its arguments.
    • never

      static <T, U> BiPredicate<T,U> never()
      Returns a predicate that never accepts its arguments.
      Type Parameters:
      T - the first parameter type
      U - the second parameter type
      Returns:
      a predicate that never accepts its arguments.
    • former

      static <T, U> BiPredicate<T,U> former(Predicate<T> predicate)
      Returns a binary predicate from a predicate that tests the first parameter only.
      Type Parameters:
      T - the first parameter type
      U - the second parameter type
      Parameters:
      predicate - the predicate for the first parameter
      Returns:
      a binary predicate from a predicate that tests the first parameter only.
    • latter

      static <T, U> BiPredicate<T,U> latter(Predicate<U> predicate)
      Returns a binary predicate from a predicate that tests the second parameter only.
      Type Parameters:
      T - the first parameter type
      U - the second parameter type
      Parameters:
      predicate - the predicate for the first parameter
      Returns:
      a binary predicate from a predicate that tests the first parameter only.
    • and

      static <T, U> BiPredicate<T,U> and(Predicate<T> predicate1, Predicate<U> predicate2)
      Returns a binary predicate composed using the conjunction of two unary predicates.
      Type Parameters:
      T - the first parameter type
      U - the second parameter type
      Parameters:
      predicate1 - the predicate for the first parameter
      predicate2 - the predicate for the second parameter
      Returns:
      a binary predicate composed using the conjunction of two unary predicates.
    • or

      static <T, U> BiPredicate<T,U> or(Predicate<T> predicate1, Predicate<U> predicate2)
      Returns a binary predicate composed using the disjunction of two unary predicates.
      Type Parameters:
      T - the first parameter type
      U - the second parameter type
      Parameters:
      predicate1 - the predicate for the first parameter
      predicate2 - the predicate for the second parameter
      Returns:
      a binary predicate composed using the disjunction of two unary predicates.