Interface FastFormat
-
- All Superinterfaces:
Cloneable
,Serializable
- All Known Implementing Classes:
FastChoiceFormat
,FastDateFormat
,FastDecimalFormat
,FastMessageFormat
public interface FastFormat extends Serializable, Cloneable
A fast-format is a wrapper around the existing java.text.Formatter objects. The fast-format reduces the possible interactions with the wrapped formatter and therefore allows to treat the formatter as some sort of immutable object. This later simplifies cloning, as now the formatter and all of its internal objects no longer need to be cloned.- Author:
- Thomas Morgner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
clone()
Clones the formatter.String
format(Object parameters)
Formats the given object in a formatter-specific way.Locale
getLocale()
Returns the current locale of the formatter.
-
-
-
Method Detail
-
getLocale
Locale getLocale()
Returns the current locale of the formatter.- Returns:
- the current locale, never null.
-
format
String format(Object parameters)
Formats the given object in a formatter-specific way.- Parameters:
parameters
- the parameters for the formatting.- Returns:
- the formatted string.
-
clone
Object clone() throws CloneNotSupportedException
Clones the formatter.- Returns:
- the clone.
- Throws:
CloneNotSupportedException
- if cloning failed.
-
-