Package com.ibm.icu.impl.number
Class LocalizedNumberFormatterAsFormat
java.lang.Object
java.text.Format
com.ibm.icu.impl.number.LocalizedNumberFormatterAsFormat
- All Implemented Interfaces:
Serializable
,Cloneable
A wrapper around LocalizedNumberFormatter implementing the Format interface, enabling improved
compatibility with other APIs. This class is serializable.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Nested classes/interfaces inherited from class java.text.Format
Format.Field
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LocalizedNumberFormatter
private final ULocale
private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionLocalizedNumberFormatterAsFormat
(LocalizedNumberFormatter formatter, ULocale locale) -
Method Summary
Modifier and TypeMethodDescriptionboolean
format
(Object obj, StringBuffer toAppendTo, FieldPosition pos) Formats a Number using the wrapped LocalizedNumberFormatter.Formats a Number using the wrapped LocalizedNumberFormatter.Gets the LocalizedNumberFormatter that this wrapper class uses to format numbers.int
hashCode()
parseObject
(String source, ParsePosition pos) Not supported.private Object
Methods inherited from class java.text.Format
clone, format, parseObject
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
formatter
-
locale
-
-
Constructor Details
-
LocalizedNumberFormatterAsFormat
-
-
Method Details
-
format
Formats a Number using the wrapped LocalizedNumberFormatter. The provided object must be a Number. -
formatToCharacterIterator
Formats a Number using the wrapped LocalizedNumberFormatter. The provided object must be a Number.- Overrides:
formatToCharacterIterator
in classFormat
-
parseObject
Not supported. This method will throw UnsupportedOperationException.- Specified by:
parseObject
in classFormat
-
getNumberFormatter
Gets the LocalizedNumberFormatter that this wrapper class uses to format numbers.- Returns:
- The unwrapped LocalizedNumberFormatter.
-
hashCode
public int hashCode() -
equals
-
writeReplace
- Throws:
ObjectStreamException
-