KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > text > MessageFormat

java.text
Class MessageFormat

java.lang.Object
  extended by java.text.Format
      extended by java.text.MessageFormat
All Implemented Interfaces:
Serializable, Cloneable
See Also:
Top Examples, Source Code, Locale, NumberFormat, DecimalFormat, ChoiceFormat

public void applyPattern(String pattern)
See Also:
IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object clone()
See Also:
Cloneable, Format
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean equals(Object obj)
See Also:
Hashtable, Object.hashCode()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final StringBuffer format(Object arguments,
                                 StringBuffer result,
                                 FieldPosition pos)
See Also:
IllegalArgumentException, Format, format
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[864]MessageFormat
By Anonymous on 2004/08/24 20:41:03  Rate
import java.text.*; 
    
  public class msgFormat  {  
    public static void main ( String args [  ]  )   {  
      MessageFormat fmt = 
       new MessageFormat ( "The square of  { 0 }  is  { 1 } \n" ) ; 
       Object values [  ]  = new Object [ 2 ] ; 
  
  
  
     int n = 5; 
  
  
  
     values [ 0 ]  = new Integer ( n ) ; 
     values [ 1 ]  = new Integer ( n * n ) ; 
    
     String s = fmt.format ( values ) ; 
     System.out.print ( s ) ; 
      }  
    } 


public final StringBuffer format(Object[] arguments,
                                 StringBuffer result,
                                 FieldPosition pos)
See Also:
IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static String format(String pattern,
                            Object... arguments)
See Also:
IllegalArgumentException, format, MessageFormat
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static String format(String pattern,
                            Object[] arguments)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public AttributedCharacterIterator formatToCharacterIterator(Object arguments)
See Also:
IllegalArgumentException, NullPointerException, Format, format
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Format[] getFormats()
See Also:
getFormatsByArgumentIndex
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Format[] getFormatsByArgumentIndex()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Locale getLocale()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int hashCode()
See Also:
Hashtable, Object.equals(java.lang.Object)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public MessageFormat(String pattern)
See Also:
IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public MessageFormat(String pattern,
                     Locale locale)
See Also:
IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object[] parse(String source)
               throws ParseException
See Also:
parse(String, ParsePosition)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object[] parse(String source,
                      ParsePosition pos)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object parseObject(String source,
                          ParsePosition pos)
See Also:
NullPointerException, Format, parse(String, ParsePosition)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setFormat(int formatElementIndex,
                      Format newFormat)
See Also:
ArrayIndexOutOfBoundsException, setFormatByArgumentIndex
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setFormatByArgumentIndex(int argumentIndex,
                                     Format newFormat)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setFormats(Format[] newFormats)
See Also:
NullPointerException, setFormatsByArgumentIndex
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setFormatsByArgumentIndex(Format[] newFormats)
See Also:
NullPointerException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setLocale(Locale locale)
See Also:
formatToCharacterIterator, toPattern, applyPattern
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String toPattern()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags