net.sf.mmm.util.nls.base
Class AbstractNlsFormatter<O>

java.lang.Object
  extended by net.sf.mmm.util.component.base.AbstractComponent
      extended by net.sf.mmm.util.component.base.AbstractLoggableComponent
          extended by net.sf.mmm.util.nls.base.AbstractNlsFormatter<O>
Type Parameters:
O - is the generic type of the object to format(Object, Locale, Map, NlsTemplateResolver).
All Implemented Interfaces:
NlsFormatter<O>
Direct Known Subclasses:
AbstractNlsFormatterPlugin, AbstractNlsMessageFormatter, NlsArgumentFormatterImpl

public abstract class AbstractNlsFormatter<O>
extends AbstractLoggableComponent
implements NlsFormatter<O>

This is the abstract base implementation of the NlsFormatter interface.
You should extend this class rather than directly implementing the NlsFormatter interface to gain compatibility with further releases.

Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Constructor Summary
AbstractNlsFormatter()
          The constructor.
 
Method Summary
 String format(O object, Locale locale, Map<String,Object> arguments, NlsTemplateResolver resolver)
          This method formats the given object according to the given locale.
 
Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableComponent
doInitialize, getLogger, setLogger
 
Methods inherited from class net.sf.mmm.util.component.base.AbstractComponent
doInitialized, getInitializationState, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.mmm.util.nls.api.NlsFormatter
format
 

Constructor Detail

AbstractNlsFormatter

public AbstractNlsFormatter()
The constructor.

Method Detail

format

public String format(O object,
                     Locale locale,
                     Map<String,Object> arguments,
                     NlsTemplateResolver resolver)
This method formats the given object according to the given locale.

Specified by:
format in interface NlsFormatter<O>
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.
Returns:
the formatted and localized string for the given object.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.