Interface Runnable

  • 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 Runnable
    Functional interface that takes any command and runs it in a void manner, without returning a result.

    It is similar to Runnable, but differs from it in such way that its unary run() method has an Exception specified in the method declaration within a throws... clause. Such declaration is required to enable the possibility of passing to respective methods and constructors of Conditional and Action commands that throw checked Exceptions without enforcing to handle them.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void run()
      Takes any command and runs it in a void manner, without returning a result value.
    • Method Detail

      • run

        void run()
          throws Exception
        Takes any command and runs it in a void manner, without returning a result value.
        Throws:
        Exception - if during the run of the passed command(s) an Exception occurred