Package ca.phon.util
Class MsFormatter
java.lang.Object
ca.phon.util.MsFormatter
Format time values in miliseconds into parseable strings.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Format
Create a new formatter object.static long
displayStringToMs
(String msText) Parse the given string into a value in miliseconds.Convert the given object into a formatted String.static String
msToDisplayString
(long ms) Convert a value in miliseconds into a string.Parse the given string into a new object instance
-
Constructor Details
-
MsFormatter
public MsFormatter()
-
-
Method Details
-
createFormatter
Create a new formatter object.- Returns:
- formatter
-
msToDisplayString
Convert a value in miliseconds into a string.- Parameters:
ms
-- Returns:
- ms as a readable string
-
displayStringToMs
Parse the given string into a value in miliseconds.- Parameters:
msText
-- Returns:
- time in miliseconds
- Throws:
ParseException
-
format
Description copied from interface:Formatter
Convert the given object into a formatted String. -
parse
Description copied from interface:Formatter
Parse the given string into a new object instance- Specified by:
parse
in interfaceFormatter<Long>
- Returns:
- parsed object
- Throws:
ParseException
- if there was a problem parsing the given text
-