|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.obe.util.AbstractBean org.obe.xpdl.model.misc.Duration
Constructor Summary | |
Duration()
Default public no-args constructor to keep Castor happy. |
|
Duration(int value,
DurationUnit unit)
Construct a new Duration. |
|
Duration(java.lang.String duration)
Construct a new Duration. |
Method Summary | |
java.lang.String |
getDuration()
Returns the duration as a string. |
long |
getDurationInMilliseconds(DurationUnit defaultUnit)
Get the duration represented as millseconds. |
DurationUnit |
getUnit()
Return this duration's unit. |
DurationUnit |
getUnit(DurationUnit defaultUnit)
Get the duration's unit. |
int |
getValue()
The duration value. |
void |
setDuration(java.lang.String duration)
Sets the duration as a string. |
void |
setUnit(DurationUnit unit)
|
void |
setValue(int value)
|
java.lang.String |
toString()
Return a String representation of the Duration. |
static Duration |
valueOf(java.lang.String duration)
Parse the duration string into a Duration object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Duration()
public Duration(int value, DurationUnit unit)
value
- The duration valueunit
- The unit of measurementpublic Duration(java.lang.String duration) throws java.lang.NumberFormatException
duration
- The duration value
java.lang.NumberFormatException
Method Detail |
public java.lang.String getDuration()
public void setDuration(java.lang.String duration)
duration
- The duration string.public int getValue()
public void setValue(int value)
public DurationUnit getUnit()
public void setUnit(DurationUnit unit)
public DurationUnit getUnit(DurationUnit defaultUnit)
defaultUnit
- The default unit if no unit specified
public long getDurationInMilliseconds(DurationUnit defaultUnit)
defaultUnit
- The default unit if no unit specified
public java.lang.String toString()
public static Duration valueOf(java.lang.String duration) throws java.lang.NumberFormatException
duration
- The duration string.
java.lang.NumberFormatException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |