Interface UnaryOperator<T>

Type Parameters:
T - the operand and result type
All Superinterfaces:
Function<T,T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface UnaryOperator<T> extends Function<T,T>
An operation on one value that answers the same type.
  • Method Details

    • identity

      static <T> UnaryOperator<T> identity()
      The operator that answers its operand.
      Type Parameters:
      T - the type
      Returns:
      the identity operator