public class TimeStringConverter extends DateTimeStringConverter
StringConverter implementation for Date values that
represent time.
DateStringConverter,
DateTimeStringConverterdateFormat, dateStyle, locale, pattern, timeStyle| Modifier | Constructor and Description |
|---|---|
|
TimeStringConverter()
|
|
TimeStringConverter(java.text.DateFormat dateFormat)
|
|
TimeStringConverter(int timeStyle)
|
|
TimeStringConverter(java.util.Locale locale)
Create a
StringConverter for Date values, using the
specified locale and the DateFormat.DEFAULT time style. |
|
TimeStringConverter(java.util.Locale locale,
int timeStyle)
|
|
TimeStringConverter(java.util.Locale locale,
java.lang.String pattern)
Create a
StringConverter for Date values, using the
specified locale and pattern. |
private |
TimeStringConverter(java.util.Locale locale,
java.lang.String pattern,
java.text.DateFormat dateFormat,
int timeStyle) |
|
TimeStringConverter(java.lang.String pattern)
Create a
StringConverter for Date values, using the
specified pattern. |
| Modifier and Type | Method and Description |
|---|---|
protected java.text.DateFormat |
getDateFormat()
Return a
DateFormat instance to use for formatting
and parsing in this StringConverter. |
fromString, toStringpublic TimeStringConverter()
public TimeStringConverter(int timeStyle)
timeStyle - the given formatting style. For example,
DateFormat.SHORT for "h:mm a" in the US locale.public TimeStringConverter(java.util.Locale locale)
StringConverter for Date values, using the
specified locale and the DateFormat.DEFAULT time style.locale - the given locale.public TimeStringConverter(java.util.Locale locale,
int timeStyle)
locale - the given locale.timeStyle - the given formatting style. For example,
DateFormat.SHORT for "h:mm a" in the US locale.public TimeStringConverter(java.lang.String pattern)
StringConverter for Date values, using the
specified pattern.pattern - the pattern describing the time format.public TimeStringConverter(java.util.Locale locale,
java.lang.String pattern)
StringConverter for Date values, using the
specified locale and pattern.locale - the given locale.pattern - the pattern describing the time format.public TimeStringConverter(java.text.DateFormat dateFormat)
dateFormat - the DateFormat to be used for formatting and
parsing.private TimeStringConverter(java.util.Locale locale,
java.lang.String pattern,
java.text.DateFormat dateFormat,
int timeStyle)
protected java.text.DateFormat getDateFormat()
Return a DateFormat instance to use for formatting
and parsing in this StringConverter.
getDateFormat in class DateTimeStringConverter