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 Detail

      • 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 java.util.function.UnaryOperator<T> asUnaryOperator()
        Creates a UnaryOperator for this instance that throws UncheckedIOException instead of IOException.
        Returns:
        an unchecked BiFunction.