Class NumberDisplay

java.lang.Object
NumberDisplay

public class NumberDisplay
extends java.lang.Object
the numberDisplay class creats the hours/minutes/seconds element
  • Constructor Summary

    Constructors 
    Constructor Description
    NumberDisplay​(int rollOverLimit)
    creats a new number based on the given limit
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getDisplayValue()
    gets the current value in string type
    int getValue()
    gets the current value
    void increment()
    increases the value based on the limit
    void setValue​(int replacementValue)
    sets the current value by checking the limit

    Methods inherited from class java.lang.Object

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

    • NumberDisplay

      public NumberDisplay​(int rollOverLimit)
      creats a new number based on the given limit
      Parameters:
      rollOverLimit - the limit
  • Method Details

    • getValue

      public int getValue()
      gets the current value
      Returns:
      value field
    • getDisplayValue

      public java.lang.String getDisplayValue()
      gets the current value in string type
      Returns:
      the value
    • setValue

      public void setValue​(int replacementValue)
      sets the current value by checking the limit
      Parameters:
      replacementValue - the new value
    • increment

      public void increment()
      increases the value based on the limit