java.text
public
abstract
class
java.text.Format
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
Format()
Constructs a new instance of Format.
Public Methods
public
Object
clone()
Returns a copy of this Format.
Returns
- a shallow copy of this 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.
Parameters
object
| the object to format |
buffer
| the StringBuffer |
field
| the FieldPosition |
Returns
- the StringBuffer parameter
buffer
public
final
String
format(Object object)
Formats the specified object using the rules of this Format.
Parameters
object
| the object to 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.
Parameters
object
| the object to format |
Returns
- an AttributedCharacterIterator with the formatted object and
attributes
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.
Parameters
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 |
Returns
- the object resulting from the parse, or null if there is an error
public
Object
parseObject(String string)
Parse the specified String using the rules of this Format.
Parameters
string
| the String to parse |
Returns
- the object resulting from the parse