All Implemented Interfaces:
Serializable, Cloneable

  • Nested Class Summary

    Nested Classes

    static class 

    Defines constants that are used as attribute keys in the AttributedCharacterIterator returned from MessageFormat.formatToCharacterIterator.

  • Constructor Summary

    Constructors

    Constructs a MessageFormat for the default FORMAT locale and the specified pattern.

    Constructs a MessageFormat for the specified locale and pattern.

  • Method Summary

    void

    Sets the pattern used by this message format.

    clone()

    Creates and returns a copy of this object.

    boolean

    Compares the specified object with this MessageFormat for equality.

    Formats an array of objects and appends the MessageFormat's pattern, with format elements replaced by the formatted objects, to the provided StringBuffer.

    Formats an array of objects and appends the MessageFormat's pattern, with format elements replaced by the formatted objects, to the provided StringBuffer.

    Creates a MessageFormat with the given pattern and uses it to format the given arguments.

    Formats an array of objects and inserts them into the MessageFormat's pattern, producing an AttributedCharacterIterator.

    Gets the formats used for the format elements in the previously set pattern string.

    Gets the formats used for the values passed into format methods or returned from parse methods.

    getLocale()

    Gets the locale that's used when creating or comparing subformats.

    int

    hashCode()

    Returns the hash code value for this MessageFormat.

    Parses text from the beginning of the given string to produce an object array.

    Parses text from a string to produce an object array.

    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

    setFormatByArgumentIndex(int argumentIndex, Format newFormat)

    Sets the format to use for the format elements within the previously set pattern string that use the given argument index.

    void

    Sets the formats to use for the format elements in the previously set pattern string.

    void

    Sets the formats to use for the values passed into format methods or returned from parse methods.

    void

    Sets the locale to be used when creating or comparing subformats.

    toPattern()

    Returns a String pattern adhering to the patterns section that represents the current state of this MessageFormat.

    toString()

    Returns a string identifying this MessageFormat, for debugging.

    Methods declared in class Format

    format, parseObject

    Formats an object to produce a string.

    Parses text from the beginning of the given string to produce an object.

    Methods declared in class Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Constructor Details

    • MessageFormat

    • MessageFormat

  • Method Details

    • setLocale

    • getLocale

    • applyPattern

    • toPattern

    • setFormatsByArgumentIndex

    • setFormats

    • setFormatByArgumentIndex

    • setFormat

    • getFormatsByArgumentIndex

    • getFormats

    • format

    • format

    • format

    • formatToCharacterIterator

    • parse

    • parse

    • parseObject

    • clone

    • equals

    • hashCode

    • toString