net.sf.mmm.util.nls.api
Interface NlsFormatter<O>

Type Parameters:
O - is the generic type of the object to format(Object, Locale, Map, NlsTemplateResolver).
All Known Subinterfaces:
NlsArgumentFormatter, NlsFormatterPlugin<O>, NlsMessageFormatter
All Known Implementing Classes:
AbstractNlsFormatter, AbstractNlsFormatterDateIso8601, AbstractNlsFormatterPlugin, AbstractNlsMessageFormatter, AbstractSimpleNlsFormatterDate, NlsArgumentFormatterImpl, NlsFormatterChoice, NlsFormatterCurrency, NlsFormatterDate, NlsFormatterDateFull, NlsFormatterDateIso8601, NlsFormatterDateLong, NlsFormatterDateMedium, NlsFormatterDatePattern, NlsFormatterDateShort, NlsFormatterDateTime, NlsFormatterDateTimeFull, NlsFormatterDateTimeIso8601, NlsFormatterDateTimeLong, NlsFormatterDateTimeMedium, NlsFormatterDateTimeShort, NlsFormatterDefault, NlsFormatterInteger, NlsFormatterNumber, NlsFormatterNumberPattern, NlsFormatterPercent, NlsFormatterTime, NlsFormatterTimeFull, NlsFormatterTimeIso8601, NlsFormatterTimeLong, NlsFormatterTimeMedium, NlsFormatterTimeShort, NlsFormatterType, NlsFormatterTypeFull, NlsFormatterTypeLong, NlsFormatterTypeMedium, NlsFormatterTypeShort, NlsMessageFormatterImpl, SimpleNlsFormatter

public interface NlsFormatter<O>

This is the interface for a formatter of an arbitrary object in a localized way.

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

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.
 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.
 

Method Detail

format

String format(O object,
              Locale locale,
              Map<String,Object> arguments,
              NlsTemplateResolver resolver)
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.
Returns:
the formatted and localized string for the given object.

format

void format(O 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.


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