Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

@FunctionalInterface

public interface DoubleUnaryOperator

An operation on one double that answers a double; the double form of UnaryOperator.

Methods

public abstract double applyAsDouble(double operand)Applies this operator.
public default DoubleUnaryOperator compose(DoubleUnaryOperator before)before, then this operator on its result.
public default DoubleUnaryOperator andThen(DoubleUnaryOperator after)This operator, then after on its result.
public static DoubleUnaryOperator identity()The operator that answers its operand.

Method details

applyAsDouble

public abstract double applyAsDouble(double operand)
Applies this operator.

Parameters

operand double
the input

Returns

the result

compose

public default DoubleUnaryOperator compose(DoubleUnaryOperator before)
before, then this operator on its result.

Parameters

before DoubleUnaryOperator
the operator applied first

Returns

the composed operator

andThen

public default DoubleUnaryOperator andThen(DoubleUnaryOperator after)
This operator, then after on its result.

Parameters

after DoubleUnaryOperator
the operator applied next

Returns

the composed operator

identity

public static DoubleUnaryOperator identity()
The operator that answers its operand.

Returns

the identity operator