Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.text

Class MessageFormat

java.lang.Object
|
+--java.text.Format
   |
   +--java.text.MessageFormat


public class MessageFormat

extends Format

Constructor Summary

MessageFormat(java.lang.String pattern)

Creates a new MessageFormat object with the specified pattern

Method Summary

voidapplyPattern(java.lang.String newPattern)

Applies the specified pattern to this MessageFormat.
java.lang.Objectclone()

Overrides Format.clone()
booleanequals(java.lang.Object obj)

Overrides Format.equals(Object obj)
static java.lang.Stringformat(java.lang.String pattern, java.lang.Object[] arguments)

A convinience method to format patterns.
java.lang.StringBufferformat(java.lang.Object[] arguments, java.lang.StringBuffer appendBuf, java.text.FieldPosition ignore)

Returns the pattern with the formatted objects.
java.lang.StringBufferformat(java.lang.Object singleArg, java.lang.StringBuffer appendBuf, java.text.FieldPosition ignore)

Returns the pattern with the formatted objects.
java.text.Format[]getFormats()

Returns an array with the Formats for the arguments.
java.util.LocalegetLocale()

Returns the locale.
inthashCode()

Overrides Format.hashCode()
java.lang.Object[]parse(java.lang.String sourceStr, java.text.ParsePosition pos)

java.lang.Object[]parse(java.lang.String sourceStr)

java.lang.ObjectparseObject(java.lang.String sourceStr, java.text.ParsePosition pos)

voidsetFormat(int variableNum, java.text.Format newFormat)

Sets the format for the argument at an specified index.
voidsetFormats(java.text.Format[] newFormats)

Sets the formats for the arguments.
voidsetLocale(java.util.Locale loc)

Sets the locale.
java.lang.StringtoPattern()

Returns the pattern.

Constructor Details

MessageFormat

public MessageFormat(java.lang.String pattern)

Creates a new MessageFormat object with the specified pattern

Parameters:


Method Details

applyPattern

public void applyPattern(java.lang.String newPattern)

Applies the specified pattern to this MessageFormat.

Parameters:


clone

public Object clone()

Overrides Format.clone()


equals

public boolean equals(java.lang.Object obj)

Overrides Format.equals(Object obj)

Parameters:


format

public final StringBuffer format(java.lang.Object[] arguments, java.lang.StringBuffer appendBuf, java.text.FieldPosition ignore)

Returns the pattern with the formatted objects.

Parameters:


format

public final StringBuffer format(java.lang.Object singleArg, java.lang.StringBuffer appendBuf, java.text.FieldPosition ignore)

Returns the pattern with the formatted objects.

Parameters:


format

public static String format(java.lang.String pattern, java.lang.Object[] arguments)

A convinience method to format patterns.

Parameters:


getFormats

public Format[] getFormats()

Returns an array with the Formats for the arguments.


getLocale

public Locale getLocale()

Returns the locale.


hashCode

public int hashCode()

Overrides Format.hashCode()


parse

public Object[] parse(java.lang.String sourceStr)

Parameters:


parse

public Object[] parse(java.lang.String sourceStr, java.text.ParsePosition pos)

Parameters:


parseObject

public Object parseObject(java.lang.String sourceStr, java.text.ParsePosition pos)

Parameters:


setFormat

public void setFormat(int variableNum, java.text.Format newFormat)

Sets the format for the argument at an specified index.

Parameters:


setFormats

public void setFormats(java.text.Format[] newFormats)

Sets the formats for the arguments.

Parameters:


setLocale

public void setLocale(java.util.Locale loc)

Sets the locale.

Parameters:


toPattern

public String toPattern()

Returns the pattern.