@FunctionalInterface
public interface LongUnaryOperator
extends java.util.function.UnaryOperator<java.lang.Long>, java.util.function.LongUnaryOperator
UnaryOperator
; provides methods operating both on objects
and on primitives.UnaryOperator
Modifier and Type | Method and Description |
---|---|
long |
apply(long x)
Computes the operator on the given input.
|
default java.lang.Long |
apply(java.lang.Long x)
Deprecated.
Please use the corresponding type-specific method instead.
|
default long |
applyAsLong(long x)
Deprecated.
Please use
apply(long) . |
static LongUnaryOperator |
identity()
Returns a
UnaryOperator that always returns the input unmodified. |
static LongUnaryOperator |
negation()
Returns a
UnaryOperator that always returns the arithmetic negation of the input. |
long apply(long x)
x
- the input.static LongUnaryOperator identity()
UnaryOperator
that always returns the input unmodified.identity
in interface java.util.function.Function<java.lang.Long,java.lang.Long>
identity
in interface java.util.function.LongUnaryOperator
identity
in interface java.util.function.UnaryOperator<java.lang.Long>
UnaryOperator.identity()
static LongUnaryOperator 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 long applyAsLong(long x)
apply(long)
.applyAsLong
in interface java.util.function.LongUnaryOperator
apply(long)
.@Deprecated default java.lang.Long apply(java.lang.Long x)
apply
in interface java.util.function.Function<java.lang.Long,java.lang.Long>