@FunctionalInterface
public interface DoubleUnaryOperator
extends java.util.function.UnaryOperator<java.lang.Double>, java.util.function.DoubleUnaryOperator
UnaryOperator
; provides methods operating both on objects
and on primitives.UnaryOperator
Modifier and Type | Method and Description |
---|---|
double |
apply(double x)
Computes the operator on the given input.
|
default java.lang.Double |
apply(java.lang.Double x)
Deprecated.
Please use the corresponding type-specific method instead.
|
default double |
applyAsDouble(double x)
Deprecated.
Please use
apply(double) . |
static DoubleUnaryOperator |
identity()
Returns a
UnaryOperator that always returns the input unmodified. |
static DoubleUnaryOperator |
negation()
Returns a
UnaryOperator that always returns the arithmetic negation of the input. |
double apply(double x)
x
- the input.static DoubleUnaryOperator identity()
UnaryOperator
that always returns the input unmodified.identity
in interface java.util.function.DoubleUnaryOperator
identity
in interface java.util.function.Function<java.lang.Double,java.lang.Double>
identity
in interface java.util.function.UnaryOperator<java.lang.Double>
UnaryOperator.identity()
static DoubleUnaryOperator negation()
UnaryOperator
that always returns the arithmetic negation of the input.Integer.MIN_VALUE
will result in Integer.MIN_VALUE
(still negative),
as the positive value of Integer.MIN_VALUE
is too big for int
(it would be 1 greater then Integer.MAX_VALUE
).@Deprecated default double applyAsDouble(double x)
apply(double)
.applyAsDouble
in interface java.util.function.DoubleUnaryOperator
apply(double)
.@Deprecated default java.lang.Double apply(java.lang.Double x)
apply
in interface java.util.function.Function<java.lang.Double,java.lang.Double>