public class TimeConverter extends Object
Modifier and Type | Method and Description |
---|---|
static long |
getMilliSeconds(long amount,
String unit)
Helper method to get the milliseconds for the given amount and unit
|
static long |
getMilliSeconds(String rawString)
Helper method to get the milliseconds for the given rawstring.
|
public static long getMilliSeconds(long amount, String unit) throws NumberFormatException
amount
- The amount for use with the unitunit
- The unitNumberFormatException
- Get thrown if an illegal unit was usedpublic static long getMilliSeconds(String rawString) throws NumberFormatException
rawString
- The rawstring which we use to extract the amount and unitNumberFormatException
- Get thrown if an illegal rawString was usedCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.