public class TMessageFormat extends TFormat
Modifier and Type | Class and Description |
---|---|
static class |
TMessageFormat.Field |
Constructor and Description |
---|
TMessageFormat(String template) |
TMessageFormat(String template,
TLocale locale) |
Modifier and Type | Method and Description |
---|---|
void |
applyPattern(String template) |
Object |
clone() |
boolean |
equals(Object object) |
StringBuffer |
format(Object[] objects,
StringBuffer buffer,
TFieldPosition field) |
StringBuffer |
format(Object object,
StringBuffer buffer,
TFieldPosition field) |
static String |
format(String template,
Object... objects) |
TAttributedCharacterIterator |
formatToCharacterIterator(Object object) |
TFormat[] |
getFormats() |
TFormat[] |
getFormatsByArgumentIndex() |
TLocale |
getLocale() |
int |
hashCode() |
Object[] |
parse(String string) |
Object[] |
parse(String string,
TParsePosition position) |
Object |
parseObject(String string,
TParsePosition position) |
void |
setFormat(int offset,
TFormat format) |
void |
setFormatByArgumentIndex(int argIndex,
TFormat format) |
void |
setFormats(TFormat[] formats) |
void |
setFormatsByArgumentIndex(TFormat[] formats) |
void |
setLocale(TLocale locale) |
String |
toPattern() |
format, parseObject
public TMessageFormat(String template)
public void applyPattern(String template)
public TAttributedCharacterIterator formatToCharacterIterator(Object object)
formatToCharacterIterator
in class TFormat
public final StringBuffer format(Object[] objects, StringBuffer buffer, TFieldPosition field)
public final StringBuffer format(Object object, StringBuffer buffer, TFieldPosition field)
public TFormat[] getFormats()
public TFormat[] getFormatsByArgumentIndex()
public void setFormatByArgumentIndex(int argIndex, TFormat format)
public void setFormatsByArgumentIndex(TFormat[] formats)
public TLocale getLocale()
public Object[] parse(String string) throws ParseException
ParseException
public Object[] parse(String string, TParsePosition position)
public Object parseObject(String string, TParsePosition position)
parseObject
in class TFormat
public void setFormat(int offset, TFormat format)
public void setFormats(TFormat[] formats)
public void setLocale(TLocale locale)
public String toPattern()
Copyright © 2019. All rights reserved.