public final class TimeFormatter extends AbstractCellFormatter
DateTimeFormatter
.EMPTY, OX, QUERY, SLASH, SPACE, UNDERSCORE
Constructor and Description |
---|
TimeFormatter()
Constructs a time formatter that uses the default locale and timezone.
|
Modifier and Type | Method and Description |
---|---|
protected String |
nonNullFormat(Object value)
Formats the specified value into a string appropriate for displaying
in a table cell.
|
TimeFormatter |
withLocale(Locale locale)
Sets the locale to use for formatting the time.
|
TimeFormatter |
withZone(ZoneId zone)
Sets the time zone to use for formatting the time.
|
format
public TimeFormatter()
public TimeFormatter withLocale(Locale locale)
locale
- locale to use for formattingpublic TimeFormatter withZone(ZoneId zone)
zone
- time zone to useprotected String nonNullFormat(Object value)
AbstractCellFormatter
nonNullFormat
in class AbstractCellFormatter
value
- the value