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