net.sf.mmm.util.nls.base
Class NlsFormatterMap
java.lang.Object
net.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.util.nls.base.NlsFormatterMap
- Direct Known Subclasses:
- ConfiguredNlsFormatterMap
public class NlsFormatterMap
- extends AbstractLoggableComponent
This class is like a Map to
register and
retrieve NlsFormatters.
ATTENTION:
The default
formatter is NOT stored in this map.
- Since:
- 1.0.1
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
- See Also:
ConfiguredNlsFormatterMap
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
builders
private final Map<String,Map<String,NlsFormatter<?>>> builders
- See Also:
getFormatter(String, String)
NlsFormatterMap
public NlsFormatterMap()
- The constructor.
registerFormatter
public NlsFormatter<?> registerFormatter(NlsFormatterPlugin<?> formatter)
- This method registers the given
formatBuilder.
- Parameters:
formatter - is the NlsFormatterPlugin to register.
- Returns:
- the
NlsFormatter that was registered for the given
type and
style and is now replaced by
the given formatter or null if no
NlsFormatter was replaced.
registerFormatter
public NlsFormatter<?> registerFormatter(NlsFormatter<?> formatter,
String formatType,
String formatStyle)
- This method registers the given
formatBuilder.
- Parameters:
formatter - is the formatter to register.formatType - is the type to be formatted.formatStyle - is the style defining details of formatting. May be
null for default formatter.
- Returns:
- the
NlsFormatter that was registered for the given
formatType and formatStyle and is now
replaced by the given formatter or null
if no NlsFormatter was replaced.
getFormatter
public NlsFormatter<?> getFormatter(String formatType,
String formatStyle)
- Parameters:
formatType - is the type to be formatted.formatStyle - is the style defining details of formatting. May be
null for default formatter of the given
formatType.
- Returns:
- the according
NlsFormatter instance or null if
NO such NlsFormatter is
registered
. - See Also:
NlsFormatterManager.getFormatter(String,
String)
Copyright © 2001-2010 mmm-Team. All Rights Reserved.