FailableIntUnaryOperator

public interface org.apache.commons.lang3.function.FailableIntUnaryOperator<E extends Throwable>[source]

A functional interface like IntUnaryOperator that declares a Throwable.

Type parameters:

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

Since:

3.11

Fields and constants

static final FailableIntUnaryOperator

NOP

NOP singleton

static final FailableIntUnaryOperator NOP[source]

NOP singleton

Methods

default FailableIntUnaryOperator<E>

andThen(FailableIntUnaryOperator<E> after)

Returns a composed FailableDoubleUnaryOperator like IntUnaryOperator.andThen(IntUnaryOperator).

int

applyAsInt(int operand)

Applies this operator to the given operand.

default FailableIntUnaryOperator<E>

compose(FailableIntUnaryOperator<E> before)

Returns a composed FailableIntUnaryOperator like IntUnaryOperator.compose(IntUnaryOperator).

static <E extends Throwable> FailableIntUnaryOperator<E>

identity()

Returns a unary operator that always returns its input argument.

static <E extends Throwable> FailableIntUnaryOperator<E>

nop()

Gets the NOP singleton.

default FailableIntUnaryOperator<E> andThen(FailableIntUnaryOperator<E> after)[source]

Returns a composed FailableDoubleUnaryOperator like IntUnaryOperator.andThen(IntUnaryOperator).

Parameters:

after – The operator to apply after this one.

Returns:

A composed FailableIntUnaryOperator like IntUnaryOperator.andThen(IntUnaryOperator).

Throws:

NullPointerException – Thrown if after is null.

See also:

compose(FailableIntUnaryOperator)

int applyAsInt(int operand) throws E[source]

Applies this operator to the given operand.

Parameters:

operand – The operand

Returns:

The operator result

Throws:

E – Thrown when a consumer fails.

default FailableIntUnaryOperator<E> compose(FailableIntUnaryOperator<E> before)[source]

Returns a composed FailableIntUnaryOperator like IntUnaryOperator.compose(IntUnaryOperator).

Parameters:

before – The operator to apply before this one.

Returns:

A composed FailableIntUnaryOperator like IntUnaryOperator.compose(IntUnaryOperator).

Throws:

NullPointerException – Thrown if before is null.

See also:

andThen(FailableIntUnaryOperator)

static <E extends Throwable> FailableIntUnaryOperator<E> identity()[source]

Returns a unary operator that always returns its input argument.

Type parameters:

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

Returns:

A unary operator that always returns its input argument

static <E extends Throwable> FailableIntUnaryOperator<E> nop()[source]

Gets the NOP singleton.

Type parameters:

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

Returns:

The NOP singleton.