Interface ExceptionUnaryOperator<T,E extends Exception>

Type Parameters:
T - the argument type
E - the exception type
All Superinterfaces:
ExceptionFunction<T,T,E>
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 ExceptionUnaryOperator<T,E extends Exception> extends ExceptionFunction<T,T,E>
A unary operator which can throw an exception.
  • Method Details

    • andThen

      default ExceptionUnaryOperator<T,E> andThen(ExceptionUnaryOperator<T,? extends E> after)
      Returns a unary operator that passes the result of this operator through the given operator.
      Parameters:
      after - the next operator (must not be null)
      Returns:
      a unary operator that passes the result of this operator through the given operator
    • compose

      default ExceptionUnaryOperator<T,E> compose(ExceptionUnaryOperator<T,? extends E> before)
      Returns a unary operator which passes the result of the given operator through this operator.
      Parameters:
      before - the first operator (must not be null)
      Returns:
      a unary operator which passes the result of the given operator through this operator
    • of

      static <T, E extends Exception> ExceptionUnaryOperator<T,E> of(ExceptionFunction<T,T,E> func)
      Returns a unary operator which is implemented by the given function.
      Type Parameters:
      T - the argument type
      E - the exception type
      Parameters:
      func - the function (must not be null)
      Returns:
      a unary operator which is implemented by the given function
    • identity

      static <T, E extends Exception> ExceptionUnaryOperator<T,E> identity()
      Returns the identity operator, which returns its argument.
      Type Parameters:
      T - the argument type
      E - the exception type
      Returns:
      the identity operator, which returns its argument