public class TimeUnit extends Unit
Modifier and Type | Field and Description |
---|---|
static TimeUnit |
day |
static TimeUnit |
hour |
static TimeUnit |
minute |
static TimeUnit |
month |
static TimeUnit |
second |
static TimeUnit |
week |
static TimeUnit |
year |
Modifier and Type | Method and Description |
---|---|
TimeUnit |
addAlternateName(java.lang.String inValue) |
int |
getCalendarNum()
Returns the associated int value to use with a Calendar object's get() method.
|
long |
getMilliseconds()
Returns the time unit's length in milliseconds.
|
static TimeUnit |
valueOf(java.lang.String inValue)
Returns the TimeUnit object that corresponds to the specified name or abbreviation string.
|
static java.util.Collection<TimeUnit> |
values() |
compareTo, compareTo, computeBaseSIValue, computeScaledValue, computeUnitLabel, computeValueFromBaseSIValue, equals, getAbbrev, getDenominator, getMathContext, getMeasurementSystem, getNumerator, getPlural, getPow, getQuantityType, getSubUnits, hashCode, hasSubUnits, name, setDefaultMathContext, setMathContext, setPlural, toString, valueOf, valueOf
public static TimeUnit valueOf(java.lang.String inValue)
inValue
- the string name or abbreviation value to be converted into a TimeUnit objectpublic int getCalendarNum()
public long getMilliseconds()
public TimeUnit addAlternateName(java.lang.String inValue)
addAlternateName
in class Unit
[email protected]