Class CollidableTimer.RunTask

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    CollidableTimer

    class CollidableTimer.RunTask
    extends java.util.TimerTask
    A task class, inheriting from TimerTask. Stores the Runnable which will need to be executed when the timer is up.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Runnable effect  
    • Constructor Summary

      Constructors 
      Constructor Description
      RunTask​(java.lang.Runnable effect)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()
      Runs teh Runnable, terminates timer thread.
      • Methods inherited from class java.util.TimerTask

        cancel, scheduledExecutionTime
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • effect

        private final java.lang.Runnable effect
    • Constructor Detail

      • RunTask

        RunTask​(java.lang.Runnable effect)
    • Method Detail

      • run

        public void run()
        Runs teh Runnable, terminates timer thread. Is executed when teh timer is up.
        Specified by:
        run in interface java.lang.Runnable
        Specified by:
        run in class java.util.TimerTask