|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.utils.conversion.TimeSpanParser
public final class TimeSpanParser
Parses a time span. Currently the units supported are from seconds, minutes, hours and days.
| Method Summary | |
|---|---|
static long |
parse(java.lang.String timeSpan,
java.util.concurrent.TimeUnit timeUnit)
Calls parse(String, TimeUnit, long) with default 0. |
static long |
parse(java.lang.String timeSpan,
java.util.concurrent.TimeUnit timeUnit,
long defaultValue)
Parses a time span string and returns the time span according to the given unit. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static long parse(java.lang.String timeSpan,
java.util.concurrent.TimeUnit timeUnit,
long defaultValue)
TimeUnit.MINUTES would result in the
value of 1440.
If the time span string could not be parsed or uses other suffixes than supported, an
IllegalArgumentException will be thrown.
timeSpan - the string representing the time spantimeUnit - the TimeUnit to be useddefaultValue - the default value to use if the time span string was null or empty.
TimeUnit.
public static long parse(java.lang.String timeSpan,
java.util.concurrent.TimeUnit timeUnit)
parse(String, TimeUnit, long) with default 0.
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||