On this page

FailableBiConsumer

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

A functional interface like BiConsumer that declares a Throwable.

Parameters:
  • <T> – Consumed type 1.

  • <U> – Consumed type 2.

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

Since:

3.11

Fields and constants

NOP

NOP singleton

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

NOP singleton

Methods

accept(Object, Object)

Accepts the given arguments.

andThen(FailableBiConsumer)

Returns a composed FailableBiConsumer like BiConsumer#andThen(BiConsumer).

nop()

Gets the NOP singleton.

public abstract void accept(T t, U u) throws E[source]

Accepts the given arguments.

Parameters:
  • t – The first parameter for the consumable to accept

  • u – The second parameter for the consumable to accept

Throws:

E – Thrown when the consumer fails.

public default FailableBiConsumer<T, U, E> andThen(FailableBiConsumer<? super T, ? super U, E> after)[source]

Returns a composed FailableBiConsumer like BiConsumer#andThen(BiConsumer).

Parameters:

after – The operation to perform after this one.

Returns:

A composed FailableBiConsumer like BiConsumer#andThen(BiConsumer).

Throws:

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

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

Gets the NOP singleton.

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

  • <U> – Consumed type 2.

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

Returns:

The NOP singleton.