| java.lang.Object | |
| ↳ | java.text.Format |
Known Direct Subclasses
|
Known Indirect Subclasses
|
Format is the abstract superclass of classes which format and parse objects according to Locale specific rules.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Format.Field | This inner class is used to represent Format attributes in the AttributedCharacterIterator that formatToCharacterIterator() method returns in the Format subclasses. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance of Format.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns a copy of this Format.
| |||||||||||
Formats the specified object into the specified StringBuffer using the
rules of this Format.
| |||||||||||
Formats the specified object using the rules of this Format.
| |||||||||||
Formats the specified object using the rules of this format and returns
an AttributedCharacterIterator with the formatted String and no
attributes.
| |||||||||||
Parse the specified String starting at the index specified by the
ParsePosition.
| |||||||||||
Parse the specified String using the rules of this Format.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
Constructs a new instance of Format.
Formats the specified object into the specified StringBuffer using the rules of this Format. If the field specified by the FieldPosition is formatted, set the begin and end index of the formatted field in the FieldPosition.
| object | the object to format |
|---|---|
| buffer | the StringBuffer |
| field | the FieldPosition |
buffer| IllegalArgumentException | when the object cannot be formatted by this Format |
|---|
Formats the specified object using the rules of this Format.
| object | the object to format |
|---|
| IllegalArgumentException | when the object cannot be formatted by this Format |
|---|
Formats the specified object using the rules of this format and returns an AttributedCharacterIterator with the formatted String and no attributes.
Subclasses should return an AttributedCharacterIterator with the appropriate attributes.
| object | the object to format |
|---|
| IllegalArgumentException | when the object cannot be formatted by this Format |
|---|
Parse the specified String starting at the index specified by the ParsePosition. If the string is successfully parsed, the index of the ParsePosition is updated to the index following the parsed text.
| string | the String to parse |
|---|---|
| position | the ParsePosition, updated on return with the index following the parsed text, or on error the index is unchanged and the error index is set to the index where the error occurred |
Parse the specified String using the rules of this Format.
| string | the String to parse |
|---|
| ParseException | when an error occurs during parsing |
|---|