Class RunnableWithDescription

java.lang.Object
com.renomad.minum.utils.RunnableWithDescription
All Implemented Interfaces:
ThrowingRunnable

public final class RunnableWithDescription extends Object implements ThrowingRunnable
This class is to improve maintainability in the system. It makes possible reviewing the queue of actions and more easily understanding the purpose of each Callable.
  • Constructor Details

    • RunnableWithDescription

      public RunnableWithDescription(ThrowingRunnable r, String description)
      By constructing a ThrowingRunnable here, you can provide a description of the runnable that will be reviewable during debugging.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • run

      public void run()
      Description copied from interface: ThrowingRunnable
      The reason this throws an exception is so that lambdas don't need to try-catch their thrown exceptions when they use this.
      Specified by:
      run in interface ThrowingRunnable