FailableToBooleanFunction

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

A functional interface like a ToBooleanFunction that declares a Throwable.

Type parameters:
  • <T> – The type of the argument to the function

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

Since:

3.18

Fields and constants

static final FailableToBooleanFunction

NOP

NOP singleton

static final FailableToBooleanFunction NOP[source]

NOP singleton

Methods

boolean

applyAsBoolean(T t)

Applies this function to the given arguments.

static <T, E extends Throwable> FailableToBooleanFunction<T, E>

nop()

Gets the NOP singleton.

boolean applyAsBoolean(T t) throws E[source]

Applies this function to the given arguments.

Parameters:

t – The first function argument

Returns:

The function result

Throws:

E – Thrown when the function fails.

static <T, E extends Throwable> FailableToBooleanFunction<T, E> nop()[source]

Gets the NOP singleton.

Type parameters:
  • <T> – The type of the argument to the function

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

Returns:

The NOP singleton.