|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.core.utils.TimeConverter
This class contains static functions used to convert time related string values into numeric values to be used in computations.
Constructor Summary | |
TimeConverter()
|
Method Summary | |
static long |
convertToMillis(java.lang.String valueToConvert)
Converts the passed time string to a time value that is measured in milliseconds. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TimeConverter()
Method Detail |
public static long convertToMillis(java.lang.String valueToConvert) throws java.lang.NumberFormatException
Converts the passed time string to a time value that is measured in milliseconds. The following extension are considered when converting the string:
Extension | Conversion Value |
---|---|
us | Microseconds |
ms | Milliseconds |
s | Seconds |
m | Minutes |
h | Hours |
d | Days |
A number entered with out any units is considered to be in milliseconds.
valueToConvert
- The string to convert to milliseconds.
java.lang.NumberFormatException
- Thrown if the string is malformed and a number cannot be
extracted from the value.
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |