Package 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

  Modifier and Type
  Method
  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 Details

  - ### identity

    static <T> IOUnaryOperator<T> identity()
    Creates a unary operator that always returns its input argument.
    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.