org.apache.commons.io.function

## Interface IOUnaryOperator<T>

- Type Parameters:
    `T` - the type of the operand and result of the operator.
  All Superinterfaces:
    IOFunction<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 IOUnaryOperator<T>
      extends IOFunction<T,T>

  Like `UnaryOperator` but throws `IOException`.
  Since:
    2.12.0
  See Also:
    `UnaryOperator`, `IOFunction`

- - ### Method Summary

    All Methods Static Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default UnaryOperator<T>` | `asUnaryOperator()` Creates a `UnaryOperator` for this instance that throws `UncheckedIOException` instead of `IOException`.
    `static <T> IOUnaryOperator<T>` | `identity()` Creates a unary operator that always returns its input argument.

    - ### Methods inherited from interface org.apache.commons.io.function.IOFunction

      `andThen, andThen, andThen, andThen, apply, asFunction, compose, compose, compose, compose`

- - ### Method Detail

    - #### identity

          static <T> IOUnaryOperator<T> identity()

      Creates a unary operator that always returns its input argument.
      Specified by:
        `identity` in interface `IOFunction<T,T>`
      Type Parameters:
        `T` - the type of the input and output of the operator.
      Returns:
        a unary operator that always returns its input argument.

    - #### asUnaryOperator

          default UnaryOperator<T> asUnaryOperator()

      Creates a `UnaryOperator` for this instance that throws `UncheckedIOException` instead of `IOException`.
      Returns:
        an unchecked BiFunction.

Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.