java.lang.Object
java.text.Format
java.text.MessageFormat
com.aoapps.lang.text.UnmodifiableMessageFormat
- All Implemented Interfaces:
Serializable
,Cloneable
A MessageFormat that may not be modified. This allows the message format to be
cached while avoiding any accidental change of the cached object.
- Author:
- AO Industries, Inc.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.text.MessageFormat
MessageFormat.Field
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyPattern
(String pattern) void
void
setFormatByArgumentIndex
(int argumentIndex, Format newFormat) void
setFormats
(Format[] newFormats) void
setFormatsByArgumentIndex
(Format[] newFormats) void
Methods inherited from class java.text.MessageFormat
clone, equals, format, format, format, formatToCharacterIterator, getFormats, getFormatsByArgumentIndex, getLocale, hashCode, parse, parse, parseObject, toPattern
Methods inherited from class java.text.Format
format, parseObject
-
Constructor Details
-
UnmodifiableMessageFormat
-
-
Method Details
-
setLocale
- Overrides:
setLocale
in classMessageFormat
- Throws:
UnsupportedOperationException
- always
-
applyPattern
- Overrides:
applyPattern
in classMessageFormat
- Throws:
UnsupportedOperationException
- except when called from constructor.
-
setFormatsByArgumentIndex
- Overrides:
setFormatsByArgumentIndex
in classMessageFormat
- Throws:
UnsupportedOperationException
- always
-
setFormats
- Overrides:
setFormats
in classMessageFormat
- Throws:
UnsupportedOperationException
- always
-
setFormatByArgumentIndex
public void setFormatByArgumentIndex(int argumentIndex, Format newFormat) throws UnsupportedOperationException - Overrides:
setFormatByArgumentIndex
in classMessageFormat
- Throws:
UnsupportedOperationException
- always
-
setFormat
public void setFormat(int formatElementIndex, Format newFormat) throws UnsupportedOperationException - Overrides:
setFormat
in classMessageFormat
- Throws:
UnsupportedOperationException
- always
-