public final class NlsFormatterDatePattern extends SimpleNlsFormatter<Object>
NlsFormatter
using a custom date pattern (typically
using SimpleDateFormat
).Constructor and Description |
---|
NlsFormatterDatePattern(String pattern)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Formatter<Object> |
createFormatter(Locale locale)
This method creates the underlying
Formatter to delegate to. |
String |
getStyle()
This method gets the
style of this formatter. |
String |
getType()
This method gets the
type of
this formatter. |
format, format
toString
createLogger, doInitialize, getLogger
doInitialized, getInitializationState, initialize
private final String pattern
public NlsFormatterDatePattern(String pattern)
pattern
- is the pattern for the date formatter
.protected Formatter<Object> createFormatter(Locale locale)
SimpleNlsFormatter
Formatter
to delegate to.createFormatter
in class SimpleNlsFormatter<Object>
locale
- is the locale of the Formatter
to create.public String getType()
NlsFormatterPlugin
type
of
this formatter. See TYPE_*
constants of NlsFormatterManager
e.g.
NlsFormatterManager.TYPE_NUMBER
.null
for the
default formatter
. If type is
null
then also style
needs to be null
.public String getStyle()
NlsFormatterPlugin
style
of this formatter. See STYLE_*
constants of
NlsFormatterManager
e.g.
NlsFormatterManager.STYLE_LONG
.null
for no style.Copyright © 2001–2016 mmm-Team. All rights reserved.