FailableLongUnaryOperator

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

A functional interface like LongUnaryOperator that declares a Throwable.

Type parameters:

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

Since:

3.11

Fields and constants

static final FailableLongUnaryOperator

NOP

NOP singleton

static final FailableLongUnaryOperator NOP[source]

NOP singleton

Methods

default FailableLongUnaryOperator<E>

andThen(FailableLongUnaryOperator<E> after)

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

long

applyAsLong(long operand)

Applies this operator to the given operand.

default FailableLongUnaryOperator<E>

compose(FailableLongUnaryOperator<E> before)

Returns a composed FailableLongUnaryOperator like LongUnaryOperator.compose(LongUnaryOperator).

static <E extends Throwable> FailableLongUnaryOperator<E>

identity()

Returns a unary operator that always returns its input argument.

static <E extends Throwable> FailableLongUnaryOperator<E>

nop()

Gets the NOP singleton.

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

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

Parameters:

after – The operator to apply after this one.

Returns:

A composed FailableLongUnaryOperator like LongUnaryOperator.andThen(LongUnaryOperator).

Throws:

NullPointerException – Thrown if after is null.

See also:

compose(FailableLongUnaryOperator)

long applyAsLong(long 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 FailableLongUnaryOperator<E> compose(FailableLongUnaryOperator<E> before)[source]

Returns a composed FailableLongUnaryOperator like LongUnaryOperator.compose(LongUnaryOperator).

Parameters:

before – The operator to apply before this one.

Returns:

A composed FailableLongUnaryOperator like LongUnaryOperator.compose(LongUnaryOperator).

Throws:

NullPointerException – Thrown if before is null.

See also:

andThen(FailableLongUnaryOperator)

static <E extends Throwable> FailableLongUnaryOperator<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> FailableLongUnaryOperator<E> nop()[source]

Gets the NOP singleton.

Type parameters:

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

Returns:

The NOP singleton.