T
- the type of the operand and result of the operatorFunction<T,T>
@FunctionalInterface public interface UnaryOperator<T> extends Function<T,T>
Function
for the case where the operand and result are of the same type. This is a functional interface whose functional method is Function.apply(Object)
.
Modifier and Type | Method | Description |
---|---|---|
static <T> UnaryOperator |
identity() |
Returns a unary operator that always returns its input argument. |
static <T> UnaryOperator<T> identity()
T
- the type of the input and output of the operator
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/function/UnaryOperator.html