FailableDoubleUnaryOperator

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

A functional interface like DoubleUnaryOperator that declares a Throwable.

Type parameters:

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

Since:

3.11

Fields and constants

static final FailableDoubleUnaryOperator

NOP

NOP singleton

static final FailableDoubleUnaryOperator NOP[source]

NOP singleton

Methods

default FailableDoubleUnaryOperator<E>

andThen(FailableDoubleUnaryOperator<E> after)

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

double

applyAsDouble(double operand)

Applies this operator to the given operand.

default FailableDoubleUnaryOperator<E>

compose(FailableDoubleUnaryOperator<E> before)

Returns a composed FailableDoubleUnaryOperator like DoubleUnaryOperator.compose(DoubleUnaryOperator).

static <E extends Throwable> FailableDoubleUnaryOperator<E>

identity()

Returns a unary operator that always returns its input argument.

static <E extends Throwable> FailableDoubleUnaryOperator<E>

nop()

Gets the NOP singleton.

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

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

Parameters:

after – The operator to apply after this one.

Returns:

A composed FailableDoubleUnaryOperator like DoubleUnaryOperator.andThen(DoubleUnaryOperator).

Throws:

NullPointerException – Thrown if after is null.

See also:

compose(FailableDoubleUnaryOperator)

double applyAsDouble(double 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 FailableDoubleUnaryOperator<E> compose(FailableDoubleUnaryOperator<E> before)[source]

Returns a composed FailableDoubleUnaryOperator like DoubleUnaryOperator.compose(DoubleUnaryOperator).

Parameters:

before – The operator to apply before this one.

Returns:

A composed FailableDoubleUnaryOperator like DoubleUnaryOperator.compose(DoubleUnaryOperator).

Throws:

NullPointerException – Thrown if before is null.

See also:

andThen(FailableDoubleUnaryOperator)

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

Gets the NOP singleton.

Type parameters:

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

Returns:

The NOP singleton.