On this page

FailableIntPredicate

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

A functional interface like IntPredicate that declares a Throwable.

Type parameters:

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

Since:

3.11

Fields and constants

static final FailableIntPredicate

FALSE

FALSE singleton

static final FailableIntPredicate

TRUE

TRUE singleton

static final FailableIntPredicate FALSE[source]

FALSE singleton

static final FailableIntPredicate TRUE[source]

TRUE singleton

Methods

default FailableIntPredicate<E>

and(FailableIntPredicate<E> other)

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

static <E extends Throwable> FailableIntPredicate<E>

falsePredicate()

Gets the FALSE singleton.

default FailableIntPredicate<E>

negate()

Returns a predicate that negates this predicate.

default FailableIntPredicate<E>

or(FailableIntPredicate<E> other)

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

boolean

test(int value)

Tests the predicate.

static <E extends Throwable> FailableIntPredicate<E>

truePredicate()

Gets the TRUE singleton.

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:

NullPointerException – Thrown if other is null.

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.

default FailableIntPredicate<E> negate()[source]

Returns a predicate that negates this predicate.

Returns:

A predicate that negates this predicate.

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:

NullPointerException – Thrown if other is null.

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.

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.