public class TimeUnit extends Unit
| Modifier and Type | Field and Description |
|---|---|
static TimeUnit |
day |
static TimeUnit |
hour |
static TimeUnit |
millisecond |
static TimeUnit |
minute |
static TimeUnit |
month |
static TimeUnit |
second |
static TimeUnit |
week |
static TimeUnit |
year |
| Modifier | Constructor and Description |
|---|---|
protected |
TimeUnit(List<SubUnit> inSubUnits) |
| Modifier and Type | Method and Description |
|---|---|
TimeUnit |
addAlternateName(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.
|
TimeUnit |
setMeasurementSystem(MeasurementSystem inValue) |
TimeUnit |
setPlural(String inValue) |
TimeUnit |
setPluralAbbrev(String inValue) |
static TimeUnit |
valueOf(String inValue)
Returns the TimeUnit object that corresponds to the specified name or abbreviation string.
|
static Collection<TimeUnit> |
values() |
compareTo, compareTo, computeBaseSIValue, computeScaledValue, computeUnitLabel, computeValueFromBaseSIValue, equals, getAbbrev, getAlternateNames, getDenominator, getMathContext, getMeasurementSystem, getNumerator, getPlural, getPluralAbbrev, getPow, getQuantityType, getSubUnits, hashCode, hasSubUnits, name, setDefaultMathContext, setMathContext, toString, valueOf, valueOfpublic static final TimeUnit millisecond
public static Collection<TimeUnit> values()
public static TimeUnit valueOf(String inValue)
inValue - the string name or abbreviation value to be converted into a TimeUnit objectpublic TimeUnit setMeasurementSystem(MeasurementSystem inValue)
setMeasurementSystem in class Unitpublic TimeUnit setPluralAbbrev(String inValue)
setPluralAbbrev in class Unitpublic int getCalendarNum()
public long getMilliseconds()
public TimeUnit addAlternateName(String inValue)
addAlternateName in class Unit
jataylor@hairyfatguy.com