O
- is the generic type of the object to format(Object, Locale, Map, NlsTemplateResolver)
.public abstract class SimpleNlsFormatter<O> extends AbstractNlsFormatterPlugin<O>
NlsFormatter
based on Formatter
.Constructor and Description |
---|
SimpleNlsFormatter()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Formatter<O> |
createFormatter(Locale locale)
This method creates the underlying
Formatter to delegate to. |
String |
format(O object,
Locale locale,
Map<String,Object> arguments,
NlsTemplateResolver resolver)
This method formats the given
object according to the given locale . |
void |
format(O object,
Locale locale,
Map<String,Object> arguments,
NlsTemplateResolver resolver,
Appendable buffer)
This method formats the given
object according to the given locale . |
toString
createLogger, doInitialize, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getStyle, getType
protected abstract Formatter<O> createFormatter(Locale locale)
Formatter
to delegate to.locale
- is the locale of the Formatter
to create.public String format(O object, Locale locale, Map<String,Object> arguments, NlsTemplateResolver resolver)
NlsFormatter
object
according to the given locale
.format
in interface NlsFormatter<O>
format
in class AbstractNlsFormatter<O>
object
- is the object to format.locale
- is the locale used for localized formatting.arguments
- is the Map
of arguments.resolver
- is the NlsTemplateResolver
.object
.public void format(O object, Locale locale, Map<String,Object> arguments, NlsTemplateResolver resolver, Appendable buffer)
NlsFormatter
object
according to the given locale
.object
- is the object to format.locale
- is the locale used for localized formatting.arguments
- is the Map
of arguments
.resolver
- is the NlsTemplateResolver
.buffer
- is where to append the formatted object
.Copyright © 2001–2016 mmm-Team. All rights reserved.