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 typeint
getValue()
gets the current valuevoid
increment()
increases the value based on the limitvoid
setValue(int replacementValue)
sets the current value by checking the limit
-
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
-