|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.infoway.messagebuilder.lang.Enum
ca.infoway.messagebuilder.lang.EnumPattern
ca.infoway.messagebuilder.domainvalue.basic.DefaultTimeUnit
public class DefaultTimeUnit
An enum to handle basic time units.
Field Summary | |
---|---|
static DefaultTimeUnit |
DAY
|
static DefaultTimeUnit |
HOUR
|
static DefaultTimeUnit |
MINUTE
|
static DefaultTimeUnit |
MONTH
|
static DefaultTimeUnit |
SECOND
|
static DefaultTimeUnit |
WEEK
|
static DefaultTimeUnit |
YEAR
|
Fields inherited from class ca.infoway.messagebuilder.lang.Enum |
---|
INNER_CLASS_SEPARATOR_CHAR, iToString, PACKAGE_SEPARATOR_CHAR |
Method Summary | |
---|---|
String |
getCodeSystem()
Returns the code system for uniform unit of measure. |
String |
getCodeValue()
Returns the code value. |
static boolean |
isDayBased(UnitsOfMeasureCaseSensitive units)
|
static DefaultTimeUnit |
lookup(String unitCodeValue)
Returns the DefaultTimeUnit that is applicable for the given unit code value. |
long |
toMilliseconds(BigDecimal quantity)
Converts the given BigDecimal into milliseconds. |
long |
toMilliseconds(int value)
Converts the given value into milliseconds. |
Methods inherited from class ca.infoway.messagebuilder.lang.EnumPattern |
---|
getEnumConstants, isEnum, name, toString, valueOf, values |
Methods inherited from class ca.infoway.messagebuilder.lang.Enum |
---|
compareTo, equals, getEnum, getEnumClass, getEnumList, getEnumMap, getName, getShortClassName, getShortClassName, hashCode, iterator, readResolve |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final DefaultTimeUnit YEAR
public static final DefaultTimeUnit MONTH
public static final DefaultTimeUnit WEEK
public static final DefaultTimeUnit DAY
public static final DefaultTimeUnit HOUR
public static final DefaultTimeUnit MINUTE
public static final DefaultTimeUnit SECOND
Method Detail |
---|
public String getCodeSystem()
Returns the code system for uniform unit of measure.
getCodeSystem
in interface Code
public String getCodeValue()
Returns the code value.
getCodeValue
in interface Code
public long toMilliseconds(int value)
Converts the given value into milliseconds.
toMilliseconds
in interface DateConverter
value
- the value to convert
public long toMilliseconds(BigDecimal quantity)
Converts the given BigDecimal into milliseconds.
quantity
- the BigDecimal to convert.
public static boolean isDayBased(UnitsOfMeasureCaseSensitive units)
public static DefaultTimeUnit lookup(String unitCodeValue)
Returns the DefaultTimeUnit that is applicable for the given unit code value.
unitCodeValue
- the unit code value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |