Interface MCRThrowableTask<T extends Throwable>

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 MCRThrowableTask<T extends Throwable>
  • Method Summary

    Modifier and Type
    Method
    Description
    andThen(MCRThrowableTask<? extends T> after)
    Returns a composed task that first this task, and then runs the after task.
    compose(MCRThrowableTask<? extends T> before)
    Returns a composed task that first runs the before task, and then runs this task.
    void
    run()
     
  • Method Details

    • run

      void run() throws T
      Throws:
      T extends Throwable
    • compose

      default MCRThrowableTask<T> compose(MCRThrowableTask<? extends T> before)
      Returns a composed task that first runs the before task, and then runs this task. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.
      Parameters:
      before - the function to apply before this function is applied
      Returns:
      a composed function that first applies the before function and then applies this function
      Throws:
      NullPointerException - if before is null
      See Also:
    • andThen

      default MCRThrowableTask<T> andThen(MCRThrowableTask<? extends T> after)
      Returns a composed task that first this task, and then runs the after task. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.
      Parameters:
      after - the function to apply after this function is applied
      Returns:
      a composed task that first runs this task and then the after task
      Throws:
      NullPointerException - if after is null
      See Also: