Java java.text MessageFormat fields, constructors, methods, implement or subclass

Example usage for Java java.text MessageFormat fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.text MessageFormat.

The text is from its open source code.

Constructor

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.

Method

voidapplyPattern(String pattern)
Sets the pattern used by this message format.
Objectclone()
Creates and returns a copy of this object.
Stringformat(Object obj)
Formats an object to produce a string.
Stringformat(String pattern, Object... arguments)
Creates a MessageFormat with the given pattern and uses it to format the given arguments.
StringBufferformat(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.
StringBufferformat(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.
ClassgetClass()
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.
voidsetFormat(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.
voidsetFormats(Format[] newFormats)
Sets the formats to use for the format elements in the previously set pattern string.
voidsetLocale(Locale locale)
Sets the locale to be used when creating or comparing subformats.
StringtoPattern()
Returns a pattern representing the current state of the message format.
StringtoString()
Returns a string representation of the object.