| |
|
| java.lang.Object org.obe.util.AbstractEnum org.obe.xpdl.model.misc.DurationUnit
DurationUnit | final public class DurationUnit extends AbstractEnum (Code) | | Class which defines all duration units available. This class defines
the following duration units:
- Y - Year
- M - Month
- D - Day
- h - Hour
- m - Minute
- s - Second
author: Adrian Price |
DAY_INT | final public static int DAY_INT(Code) | | |
HOUR_INT | final public static int HOUR_INT(Code) | | |
MINUTE_INT | final public static int MINUTE_INT(Code) | | |
MONTH_INT | final public static int MONTH_INT(Code) | | |
SECOND_INT | final public static int SECOND_INT(Code) | | |
YEAR_INT | final public static int YEAR_INT(Code) | | |
getJDKCalendarField | public int getJDKCalendarField()(Code) | | Returns the integer code for the corresponding JDK Calendar field. This
value can be passed to the java.util.Calendar.add(int, int)
method.
One of the constants declared by thejava.util.Calendar class. |
toMilliseconds | public long toMilliseconds()(Code) | | Converts the duration unit to milliseconds.
N.B. For duration units
DurationUnit.MONTH and
DurationUnit.YEAR this method
returns only a rough approximation based on 30 days per month and 365
days per year respectively. Be wary of using the resulting milliseconds
value for serious temporal computations.
Duration unit value expressed milliseconds. |
valueOf | public static DurationUnit valueOf(String tag)(Code) | | Converts the specified type String to a DurationUnit object. If the
String cannot be converted to a DurationUnit then the value null
is returned.
Parameters: tag - The duration unit String A DurationUnit or null |
|
|
|