jaige
Class VersionFormat
java.lang.Object
java.text.Format
jaige.VersionFormat
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class VersionFormat
- extends java.text.Format
- 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 toAppendTo,
java.text.FieldPosition pos)
Formats an object and appends the resulting text to a given string buffer. |
static VersionFormat |
getDefaultFormatter()
|
java.lang.Object |
parseObject(java.lang.String source,
java.text.ParsePosition pos)
Parses text from a string to produce an object. |
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 |
VersionFormat
public VersionFormat()
getDefaultFormatter
public static VersionFormat getDefaultFormatter()
format
public java.lang.StringBuffer format(java.lang.Object obj,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
- Formats an object and appends the resulting text to a given string buffer.
- Specified by:
format
in class java.text.Format
- Parameters:
obj
- The object to formattoAppendTo
- where the text is to be appendedpos
- A FieldPosition
identifying a field in the
formatted text
- Returns:
- the string buffer passed in as
toAppendTo
, with
formatted text appended
parseObject
public java.lang.Object parseObject(java.lang.String source,
java.text.ParsePosition pos)
- Parses text from a string to produce an object.
- Specified by:
parseObject
in class java.text.Format
- Parameters:
source
- A String
, part of which should be parsed.pos
- A ParsePosition
object with index and error index
information as described above.
- Returns:
- An
Object
parsed from the string. In case of error,
returns null.