On this page

FailableBiFunction

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

A functional interface like BiFunction that declares a Throwable.

Parameters:
  • <T> – Input type 1.

  • <U> – Input type 2.

  • <R> – Return type.

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

Since:

3.11

Fields and constants

NOP

NOP singleton

@SuppressWarnings({"rawtypes"}) public static final FailableBiFunction NOP[source]

NOP singleton

Methods

andThen(FailableFunction)

Returns a composed FailableBiFunction that like BiFunction#andThen(Function).

apply(Object, Object)

Applies this function.

nop()

Gets the NOP singleton.

public default <V> FailableBiFunction<T, U, V, E> andThen(FailableFunction<? super R, ? extends V, E> after)[source]

Returns a composed FailableBiFunction that like BiFunction#andThen(Function).

Type parameters:

<V> – The output type of the after function, and of the composed function.

Parameters:

after – The operation to perform after this one.

Returns:

A composed FailableBiFunction that like BiFunction#andThen(Function).

Throws:

java.lang.NullPointerException – Thrown when after is null.

public abstract R apply(T input1, U input2) throws E[source]

Applies this function.

Parameters:
  • input1 – The first input for the function

  • input2 – The second input for the function

Returns:

The result of the function

Throws:

E – Thrown when the function fails.

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

Gets the NOP singleton.

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

  • <U> – Consumed type 2.

  • <R> – Return type.

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

Returns:

The NOP singleton.