On this page

BooleanConsumer

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

A functional interface like IntConsumer but for boolean.

Since:

3.13.0

See also:

IntConsumer

Fields and constants

static final BooleanConsumer

NOP

NOP singleton

static final BooleanConsumer NOP[source]

NOP singleton

Methods

void

accept(boolean value)

Accepts the given arguments.

default BooleanConsumer

andThen(BooleanConsumer after)

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

static BooleanConsumer

nop()

Gets the NOP singleton.

void accept(boolean value)[source]

Accepts the given arguments.

Parameters:

value – The input argument

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:

NullPointerException – Thrown if after is null.

static BooleanConsumer nop()[source]

Gets the NOP singleton.

Returns:

The NOP singleton.