Class LoopingRunnable

  • All Implemented Interfaces:
    Runnable

    public class LoopingRunnable
    extends Object
    implements Runnable
    A Runnable wrapper which handles the stopping of a runnable which should be looping.
    • Constructor Detail

      • LoopingRunnable

        public LoopingRunnable​(Runnable runnable)
      • LoopingRunnable

        public LoopingRunnable​(Runnable runnable,
                               boolean isEventBased)
    • Method Detail

      • stop

        public void stop()
        Stops the runnable once it has completed its cycle.
      • run

        public void run()
        Specified by:
        run in interface Runnable