Example usage for Java java.text MessageFormat fields, constructors, methods, implement or subclass
The text is from its open source code.
MessageFormat(String pattern) Constructs a MessageFormat for the default java.util.Locale.Category#FORMAT FORMAT locale and the specified pattern. | |
MessageFormat(String pattern, Locale locale) Constructs a MessageFormat for the specified locale and pattern. |
void | applyPattern(String pattern) Sets the pattern used by this message format. |
Object | clone() Creates and returns a copy of this object. |
String | format(Object obj) Formats an object to produce a string. |
String | format(String pattern, Object... arguments) Creates a MessageFormat with the given pattern and uses it to format the given arguments. |
StringBuffer | format(Object[] arguments, StringBuffer result, FieldPosition pos) Formats an array of objects and appends the MessageFormat 's pattern, with format elements replaced by the formatted objects, to the provided StringBuffer . |
StringBuffer | format(Object arguments, StringBuffer result, FieldPosition pos) Formats an array of objects and appends the MessageFormat 's pattern, with format elements replaced by the formatted objects, to the provided StringBuffer . |
Class> | getClass() Returns the runtime class of this Object . |
Format[] | getFormats() Gets the formats used for the format elements in the previously set pattern string. |
Format[] | getFormatsByArgumentIndex() Gets the formats used for the values passed into format methods or returned from parse methods. |
Object[] | parse(String source) Parses text from the beginning of the given string to produce an object array. |
Object[] | parse(String source, ParsePosition pos) Parses the string. |
void | setFormat(int formatElementIndex, Format newFormat) Sets the format to use for the format element with the given format element index within the previously set pattern string. |
void | setFormats(Format[] newFormats) Sets the formats to use for the format elements in the previously set pattern string. |
void | setLocale(Locale locale) Sets the locale to be used when creating or comparing subformats. |
String | toPattern() Returns a pattern representing the current state of the message format. |
String | toString() Returns a string representation of the object. |