net.sf.mmm.util.nls.impl.formatter
Class NlsFormatterDefault
java.lang.Object
net.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.util.nls.base.AbstractNlsFormatter<O>
net.sf.mmm.util.nls.base.AbstractNlsFormatterPlugin<Object>
net.sf.mmm.util.nls.impl.formatter.NlsFormatterDefault
- All Implemented Interfaces:
- NlsFormatter<Object>, NlsFormatterPlugin<Object>
@Named
@Singleton
public class NlsFormatterDefault
- extends AbstractNlsFormatterPlugin<Object>
This is an implementation of NlsFormatter for
default formatting.
- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
NlsFormatterDefault
public NlsFormatterDefault()
- The constructor.
format
public void format(Object object,
Locale locale,
Map<String,Object> arguments,
NlsTemplateResolver resolver,
Appendable buffer)
throws IOException
- This method formats the given
object according to the given
locale.
- Parameters:
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.
- Throws:
IOException - if the given Appendable caused such exception.
getStyle
public String getStyle()
- This method gets the
style of this formatter. See STYLE_* constants of
NlsFormatterManager e.g.
NlsFormatterManager.STYLE_LONG.
- Returns:
- the style or
null for no style.
getType
public String getType()
- This method gets the
type of this formatter. See TYPE_* constants of
NlsFormatterManager e.g.
NlsFormatterManager.TYPE_NUMBER.
- Returns:
- the type or
null for the
default formatter. If type is null then also
style needs to be null.
Copyright © 2001-2010 mmm-Team. All Rights Reserved.