-
- Type Parameters:
V
- type of value toformat
.
- All Known Subinterfaces:
NlsFormatterPlugin
,NlsMessageFormatter
,NlsVariableFormatter
public interface NlsFormatter<V>
This is the interface for a formatter of an arbitrary object in a localized way.- See Also:
Format
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default String
format(V object, Locale locale, NlsArguments arguments)
This method formats the givenobject
according to the givenlocale
.void
format(V object, Locale locale, NlsArguments arguments, Appendable buffer)
This method formats the givenobject
according to the givenlocale
.
-
-
-
Method Detail
-
format
default String format(V object, Locale locale, NlsArguments arguments)
This method formats the givenobject
according to the givenlocale
.- Parameters:
object
- is the object to format.locale
- is the locale used for localized formatting.arguments
- is theMap
of arguments.- Returns:
- the formatted and localized string for the given
object
.
-
format
void format(V object, Locale locale, NlsArguments arguments, Appendable buffer)
This method formats the givenobject
according to the givenlocale
.- Parameters:
object
- is the object to format.locale
- is the locale used for localized formatting.arguments
- is theMap
ofarguments
.buffer
- is where to append the formattedobject
.- Throws:
RuntimeIoException
- if the givenAppendable
caused anIOException
.
-
-