- java.lang.Object
-
- java.text.Format
-
- java.text.MessageFormat
-
- com.aoapps.lang.text.UnmodifiableMessageFormat
-
- All Implemented Interfaces:
Serializable,Cloneable
public class UnmodifiableMessageFormat extends MessageFormat
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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.text.MessageFormat
MessageFormat.Field
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableMessageFormat(String pattern, Locale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyPattern(String pattern)voidsetFormat(int formatElementIndex, Format newFormat)voidsetFormatByArgumentIndex(int argumentIndex, Format newFormat)voidsetFormats(Format[] newFormats)voidsetFormatsByArgumentIndex(Format[] newFormats)voidsetLocale(Locale locale)-
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
-
-
-
-
Method Detail
-
setLocale
public void setLocale(Locale locale) throws UnsupportedOperationException
- Overrides:
setLocalein classMessageFormat- Throws:
UnsupportedOperationException- always
-
applyPattern
public void applyPattern(String pattern) throws UnsupportedOperationException
- Overrides:
applyPatternin classMessageFormat- Throws:
UnsupportedOperationException- except when called from constructor.
-
setFormatsByArgumentIndex
public void setFormatsByArgumentIndex(Format[] newFormats) throws UnsupportedOperationException
- Overrides:
setFormatsByArgumentIndexin classMessageFormat- Throws:
UnsupportedOperationException- always
-
setFormats
public void setFormats(Format[] newFormats) throws UnsupportedOperationException
- Overrides:
setFormatsin classMessageFormat- Throws:
UnsupportedOperationException- always
-
setFormatByArgumentIndex
public void setFormatByArgumentIndex(int argumentIndex, Format newFormat) throws UnsupportedOperationException- Overrides:
setFormatByArgumentIndexin classMessageFormat- Throws:
UnsupportedOperationException- always
-
setFormat
public void setFormat(int formatElementIndex, Format newFormat) throws UnsupportedOperationException- Overrides:
setFormatin classMessageFormat- Throws:
UnsupportedOperationException- always
-
-