Module org.example

Class TheClock

java.lang.Object
cz.cvut.fel.pjv.TimeClock.TheClock
All Implemented Interfaces:
java.lang.Runnable

public class TheClock
extends java.lang.Object
implements java.lang.Runnable
Class for manipulation with the ChessClock.
  • Constructor Summary

    Constructors
    Constructor Description
    TheClock​(double timeLets)
    The ChessClock constructor.
  • Method Summary

    Modifier and Type Method Description
    java.lang.Thread getThr()  
    double getTimeLefts()  
    boolean isClockEnded()
    Check if the clock has been ended.
    boolean isThreadSuspended()  
    void run()  
    void setThr​(java.lang.Thread thr)  
    void setThreadSuspended​(boolean threadSuspended)  
    void setTimeLefts​(int timeLefts)  
    void start()  
    void stop()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TheClock

      public TheClock​(double timeLets)
      The ChessClock constructor.
      Parameters:
      timeLets -
  • Method Details

    • setTimeLefts

      public void setTimeLefts​(int timeLefts)
    • setThr

      public void setThr​(java.lang.Thread thr)
    • setThreadSuspended

      public void setThreadSuspended​(boolean threadSuspended)
    • getThr

      public java.lang.Thread getThr()
    • isThreadSuspended

      public boolean isThreadSuspended()
    • getTimeLefts

      public double getTimeLefts()
    • start

      public void start()
    • stop

      public void stop()
    • run

      public void run()
      Specified by:
      run in interface java.lang.Runnable
    • isClockEnded

      public boolean isClockEnded()
      Check if the clock has been ended.
      Returns: