FailableIntPredicate

@FunctionalInterface public abstract interface org.apache.commons.lang3.function.FailableIntPredicate<E extends Throwable>[source]

A functional interface like IntPredicate that declares a Throwable.

Parameters:

<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 FailableIntPredicate FALSE[source]

FALSE singleton

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

TRUE singleton

Methods

and(FailableIntPredicate)

Returns a composed FailableIntPredicate like IntPredicate#and(IntPredicate).

falsePredicate()

Gets the FALSE singleton.

negate()

Returns a predicate that negates this predicate.

or(FailableIntPredicate)

Returns a composed FailableIntPredicate like IntPredicate#and(IntPredicate).

test(int)

Tests the predicate.

truePredicate()

Gets the TRUE singleton.

public default FailableIntPredicate<E> and(FailableIntPredicate<E> other)[source]

Returns a composed FailableIntPredicate like IntPredicate#and(IntPredicate).

Parameters:

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

Returns:

A composed FailableIntPredicate like IntPredicate#and(IntPredicate).

Throws:

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

@SuppressWarnings({"unchecked"}) public static <E extends Throwable> FailableIntPredicate<E> falsePredicate()[source]

Gets the FALSE singleton.

Type parameters:

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

Returns:

The NOP singleton.

public default FailableIntPredicate<E> negate()[source]

Returns a predicate that negates this predicate.

Returns:

A predicate that negates this predicate.

public default FailableIntPredicate<E> or(FailableIntPredicate<E> other)[source]

Returns a composed FailableIntPredicate like IntPredicate#and(IntPredicate).

Parameters:

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

Returns:

A composed FailableIntPredicate like IntPredicate#and(IntPredicate).

Throws:

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

public abstract boolean test(int value) throws E[source]

Tests the predicate.

Parameters:

value – The parameter for the predicate to accept.

Returns:

true if the input argument matches the predicate, false otherwise.

Throws:

E – Thrown when the consumer fails.

@SuppressWarnings({"unchecked"}) public static <E extends Throwable> FailableIntPredicate<E> truePredicate()[source]

Gets the TRUE singleton.

Type parameters:

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

Returns:

The NOP singleton.