public class TimeConverter extends NumberConverter
TimeFormats, to avoid creation and
parsing of timeformats every time one is used.| Constructor and Description |
|---|
TimeConverter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
toObject(java.lang.String pString,
java.lang.Class pType,
java.lang.String pFormat)
Converts the string to a time, using the given format for parsing.
|
java.lang.String |
toString(java.lang.Object pObject,
java.lang.String pFormat)
Converts the object to a string, using the given format
|
getFormatpublic java.lang.Object toObject(java.lang.String pString,
java.lang.Class pType,
java.lang.String pFormat)
throws ConversionException
toObject in interface PropertyConvertertoObject in class NumberConverterpString - the string to convert.pType - the type to convert to. PropertyConverter
implementations may choose to ignore this parameter.pFormat - the format used for parsing. PropertyConverter
implementations may choose to ignore this parameter. Also,
implementations that require a parser format, should provide a default
format, and allow null as the format argument.com.twelvemonkeys.util.TimeConversionExceptionTime,
TimeFormatpublic java.lang.String toString(java.lang.Object pObject,
java.lang.String pFormat)
throws ConversionException
toString in interface PropertyConvertertoString in class NumberConverterpObject - the object to convert.pFormat - the format used for parsing. PropertyConverter
implementations may choose to ignore this parameter. Also,
implementations that require a parser format, should provide a default
format, and allow null as the format argument.ConversionException - if the object is not a subclass of
com.twelvemonkeys.util.TimeTime,
TimeFormatCopyright © 2018. All Rights Reserved.