Top Description Methods
java.util.function

public Interface UnaryOperator<T>

extends Function<T, T>
Known Direct Implementers
jdk.internal.foreign.LayoutPath.GroupElementByName, jdk.internal.foreign.LayoutPath.GroupElementByIndex, jdk.internal.foreign.LayoutPath.SequenceElementByIndex, jdk.internal.foreign.LayoutPath.SequenceElementByRange, jdk.internal.foreign.LayoutPath.SequenceElement, jdk.internal.foreign.LayoutPath.DereferenceElement
Annotations
@FunctionalInterface
Type Parameters
<T>
the type of the operand and result of the operator

Represents an operation on a single operand that produces a result of the same type as its operand. This is a specialization of Function for the case where the operand and result are of the same type.

This is a functional interface whose functional method is apply(Object).

Since
1.8
See Also
Function

Method Summary

Modifier and TypeMethod and Description
public static <
the type of the input and output of the operator
T
>
UnaryOperator<T>

Returns:

a unary operator that always returns its input argument
identity
()

Hides java.util.function.Function.identity.

Returns a unary operator that always returns its input argument.

Inherited from java.util.function.Function:
andThenapplycompose

Method Detail

identityback to summary
public static <T> UnaryOperator<T> identity()

Hides java.util.function.Function.identity.

Returns a unary operator that always returns its input argument.

Parameters
<T>
the type of the input and output of the operator
Returns:UnaryOperator<T>

a unary operator that always returns its input argument