public class TimeUnit
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
TimeUnit(java.lang.String unit,
int numberOfDigits,
int minValue,
int maxValue,
long factorToMilliseconds)
Instantiates a new time unit.
|
Modifier and Type | Method and Description |
---|---|
long |
getFactorToMilliseconds()
Gets the factor to milliseconds.
|
int |
getMaxValue()
Gets the max value.
|
int |
getMinValue()
Gets the min value.
|
int |
getNumberOfDigits()
Returns the number of digits.
|
java.lang.String |
getUnit()
Returns the unit.
|
void |
setFactorToMilliseconds(long factorToMilliseconds)
Sets the factor to milliseconds.
|
void |
setMaxValue(int maxValue)
Sets the max value.
|
void |
setMinValue(int minValue)
Sets the min value.
|
void |
setNumberOfDigits(int numberOfDigits)
Sets the number of digits.
|
void |
setUnit(java.lang.String unit)
Sets the unit.
|
java.lang.String |
toString() |
public TimeUnit(java.lang.String unit, int numberOfDigits, int minValue, int maxValue, long factorToMilliseconds)
unit
- the unitnumberOfDigits
- the number of digitspublic java.lang.String toString()
toString
in class java.lang.Object
public void setUnit(java.lang.String unit)
unit
- the new unitpublic java.lang.String getUnit()
public void setNumberOfDigits(int numberOfDigits)
numberOfDigits
- the new number of digitspublic int getNumberOfDigits()
public void setMinValue(int minValue)
minValue
- the new min valuepublic int getMinValue()
public void setMaxValue(int maxValue)
maxValue
- the new max valuepublic int getMaxValue()
public void setFactorToMilliseconds(long factorToMilliseconds)
factorToMilliseconds
- the new factor to millisecondspublic long getFactorToMilliseconds()