|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.luniks.text.TimeFormat
Class to convert Strings representing a time to milliseconds and to format seconds as String representing a time.
| Field Summary | |
private static java.text.DecimalFormat |
decimalFormat
|
private static java.text.DecimalFormat |
numberFormat
|
| Constructor Summary | |
TimeFormat()
|
|
| Method Summary | |
java.lang.String |
format(int seconds)
Formats the seconds given as int argument to a String representing a time in the format "HH:mm:ss" |
java.lang.String |
format(long millis)
Formats the milliseconds given as long argument to a String representing a time in the format "HH:mm:ss,SSS" |
static void |
main(java.lang.String[] args)
For testing |
long |
parse(java.lang.String time)
Converts a String representing a time in the format "HH:mm:ss,SSS" to milliseconds. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.text.DecimalFormat decimalFormat
private static final java.text.DecimalFormat numberFormat
| Constructor Detail |
public TimeFormat()
| Method Detail |
public long parse(java.lang.String time)
throws java.text.ParseException
time - String representing a time
java.text.ParseExceptionpublic java.lang.String format(int seconds)
seconds - the seconds to format
public java.lang.String format(long millis)
millis - the milliseconds to format
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||