com.google.visualization.datasource.base
Class TextFormat
java.lang.Object
java.text.Format
com.ibm.icu.text.UFormat
com.google.visualization.datasource.base.TextFormat
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class TextFormat
- extends com.ibm.icu.text.UFormat
A UFormat that performs (dummy) formatting and parsing of text (string) values.
This class is required only to be consistent with the UFormat API, its methods do nothing.
- Author:
- Hillel M.
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class java.text.Format |
java.text.Format.Field |
|
Method Summary |
java.lang.StringBuffer |
format(java.lang.Object obj,
java.lang.StringBuffer appendTo,
java.text.FieldPosition pos)
Formats a TextValue and appends the result to a StringBuffer. |
java.lang.Object |
parseObject(java.lang.String source,
java.text.ParsePosition pos)
Parse a string into a TextValue. |
| Methods inherited from class com.ibm.icu.text.UFormat |
getLocale |
| Methods inherited from class java.text.Format |
clone, format, formatToCharacterIterator, parseObject |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextFormat
public TextFormat()
format
public java.lang.StringBuffer format(java.lang.Object obj,
java.lang.StringBuffer appendTo,
java.text.FieldPosition pos)
- Formats a TextValue and appends the result to a StringBuffer.
- Specified by:
format in class java.text.Format
- Parameters:
obj - The object to format.appendTo - The StringBuffer to which the formatted string is appended.pos - A FieldPosition parameter not used in this case.
- Returns:
- A StringBuffer with the formatted string for this object.
parseObject
public java.lang.Object parseObject(java.lang.String source,
java.text.ParsePosition pos)
- Parse a string into a TextValue.
If this method is used to parse an empty string and it is called via
Format.parseObject(Object) a ParseException is thrown.
- Specified by:
parseObject in class java.text.Format
- Parameters:
source - The string to parse from.pos - Marks the end of the parsing or 0 if the parsing failed.
- Returns:
- A BooleanValue for the parsed string.
- Throws:
java.lang.NullPointerException - if pos is null or source is null.
Copyright © 2009 Google. All Rights Reserved.