On this page

FailableBiPredicate

@FunctionalInterface public abstract interface org.apache.commons.lang3.function.FailableBiPredicate<T, U, E extends Throwable>[source]

A functional interface like BiPredicate that declares a Throwable.

Parameters:
  • <T> – Predicate type 1.

  • <U> – Predicate type 2.

  • <E> – The kind of thrown exception or error.

Since:

3.11

Fields and constants

FALSE

FALSE singleton

TRUE

TRUE singleton

@SuppressWarnings({"rawtypes"}) public static final FailableBiPredicate FALSE[source]

FALSE singleton

@SuppressWarnings({"rawtypes"}) public static final FailableBiPredicate TRUE[source]

TRUE singleton

Methods

and(FailableBiPredicate)

Returns a composed FailableBiPredicate like BiPredicate#and(BiPredicate).

falsePredicate()

Gets the FALSE singleton.

negate()

Returns a predicate that negates this predicate.

or(FailableBiPredicate)

Returns a composed FailableBiPredicate like BiPredicate#and(BiPredicate).

test(Object, Object)

Tests the predicate.

truePredicate()

Gets the TRUE singleton.

public default FailableBiPredicate<T, U, E> and(FailableBiPredicate<? super T, ? super U, E> other)[source]

Returns a composed FailableBiPredicate like BiPredicate#and(BiPredicate).

Parameters:

other – A predicate that will be logically-ANDed with this predicate.

Returns:

A composed FailableBiPredicate like BiPredicate#and(BiPredicate).

Throws:

java.lang.NullPointerException – Thrown if other is null.

@SuppressWarnings({"unchecked"}) public static <T, U, E extends Throwable> FailableBiPredicate<T, U, E> falsePredicate()[source]

Gets the FALSE singleton.

Type parameters:
  • <T> – Consumed type 1.

  • <U> – Consumed type 2.

  • <E> – The kind of thrown exception or error.

Returns:

The NOP singleton.

public default FailableBiPredicate<T, U, E> negate()[source]

Returns a predicate that negates this predicate.

Returns:

A predicate that negates this predicate.

public default FailableBiPredicate<T, U, E> or(FailableBiPredicate<? super T, ? super U, E> other)[source]

Returns a composed FailableBiPredicate like BiPredicate#and(BiPredicate).

Parameters:

other – A predicate that will be logically-ORed with this predicate.

Returns:

A composed FailableBiPredicate like BiPredicate#and(BiPredicate).

Throws:

java.lang.NullPointerException – Thrown if other is null.

public abstract boolean test(T object1, U object2) throws E[source]

Tests the predicate.

Parameters:
  • object1 – The first object to test the predicate on

  • object2 – The second object to test the predicate on

Returns:

The predicate’s evaluation

Throws:

E – Thrown when this predicate fails.

@SuppressWarnings({"unchecked"}) public static <T, U, E extends Throwable> FailableBiPredicate<T, U, E> truePredicate()[source]

Gets the TRUE singleton.

Type parameters:
  • <T> – Consumed type 1.

  • <U> – Consumed type 2.

  • <E> – The kind of thrown exception or error.

Returns:

The NOP singleton.