public class MessageFormatTemplateFormatter extends java.lang.Object implements TemplateFormatter
MessageFormat
based implementation of
TemplateFormatter
.Constructor and Description |
---|
MessageFormatTemplateFormatter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.lang.String msgTemplate,
java.util.List<java.lang.String> args,
java.util.Locale locale)
Formats a message template for the target locale.
|
java.lang.String |
format(java.lang.String msgTemplate,
java.util.List<java.lang.String> args,
java.util.Locale locale,
java.util.TimeZone tz)
Formats a message template for the target locale.
|
public java.lang.String format(java.lang.String msgTemplate, java.util.List<java.lang.String> args, java.util.Locale locale)
TemplateFormatter
format
in interface TemplateFormatter
msgTemplate
- locale-specific message templateargs
- arguments to substitute in the templatelocale
- target locale; used to localize replaced args
public java.lang.String format(java.lang.String msgTemplate, java.util.List<java.lang.String> args, java.util.Locale locale, java.util.TimeZone tz)
TemplateFormatter
format
in interface TemplateFormatter
msgTemplate
- locale-specific message templateargs
- arguments to substitute in the templatelocale
- target locale; used to localize replaced args
tz
- target time zone for date and time values; if null
default MessageFormat
behavior will be used