BooleanConsumer

@FunctionalInterface public abstract interface org.apache.commons.lang3.function.BooleanConsumer[source]

A functional interface like IntConsumer but for boolean.

See also:

IntConsumer

Since:

3.13.0

Fields and constants

NOP

NOP singleton

public static final BooleanConsumer NOP[source]

NOP singleton

Methods

accept(boolean)

Accepts the given arguments.

andThen(BooleanConsumer)

Returns a composed BooleanConsumer that performs, in sequence, this operation followed by the after operation.

nop()

Gets the NOP singleton.

public abstract void accept(boolean value)[source]

Accepts the given arguments.

Parameters:

value – The input argument

public default BooleanConsumer andThen(BooleanConsumer after)[source]

Returns a composed BooleanConsumer that performs, in sequence, this operation followed by the after operation. If performing either operation throws an exception, it is relayed to the caller of the composed operation. If performing this operation throws an exception, the after operation will not be performed.

Parameters:

after – The operation to perform after this operation

Returns:

A composed BooleanConsumer that performs in sequence this operation followed by the after operation

Throws:

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

public static BooleanConsumer nop()[source]

Gets the NOP singleton.

Returns:

The NOP singleton.