@FunctionalInterface
public interface ByteUnaryOperator
extends java.util.function.UnaryOperator<java.lang.Byte>, java.util.function.IntUnaryOperator
UnaryOperator
; provides methods operating both on objects
and on primitives.UnaryOperator
Modifier and Type | Method and Description |
---|---|
byte |
apply(byte x)
Computes the operator on the given input.
|
default java.lang.Byte |
apply(java.lang.Byte x)
Deprecated.
Please use the corresponding type-specific method instead.
|
default int |
applyAsInt(int x)
Deprecated.
Please use
apply(byte) . |
static ByteUnaryOperator |
identity()
Returns a
UnaryOperator that always returns the input unmodified. |
static ByteUnaryOperator |
negation()
Returns a
UnaryOperator that always returns the arithmetic negation of the input. |
byte apply(byte x)
x
- the input.static ByteUnaryOperator identity()
UnaryOperator
that always returns the input unmodified.identity
in interface java.util.function.Function<java.lang.Byte,java.lang.Byte>
identity
in interface java.util.function.IntUnaryOperator
identity
in interface java.util.function.UnaryOperator<java.lang.Byte>
UnaryOperator.identity()
static ByteUnaryOperator 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 int applyAsInt(int x)
apply(byte)
.applyAsInt
in interface java.util.function.IntUnaryOperator
java.lang.IllegalArgumentException
- If the given operands are not an element of the key domain.apply(byte)
after narrowing down the argument to the
actual key type, throwing an exception if the argument cannot be
represented in the restricted domain. This is done for interoperability
with the Java 8 function environment. The use of this method discouraged, as
unexpected errors can occur.@Deprecated default java.lang.Byte apply(java.lang.Byte x)
apply
in interface java.util.function.Function<java.lang.Byte,java.lang.Byte>