This class provides the interface for formatting and parsing quantities.
| Modifier and Type | Field and Description |
|---|---|
| protected static final String | DEFAULT_DELIMITER
The default delimiter. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract Appendable | Returns: the specifiedAppendable.the quantity to format. quantity, Appendable the appendable destination. dest)Redeclares javax. Formats the specified quantity into an |
| public final StringBuffer | format(Object
The object to format obj, final StringBuffer where the text is to be appended toAppendTo, FieldPosition A pos)FieldPosition identifying a field
in the formatted textImplements abstract java. Formats an object and appends the resulting text to a given string buffer. |
| public final String | Returns: Formatted string.The quantity to format quantity)Implements javax. Formats an object to produce a string. |
| protected final StringBuffer | Returns: the specifiedStringBuilder.the quantity to format. quantity, StringBuffer the appendable destination. dest)Convenience method equivalent to |
| protected abstract StringBuffer | Returns: the specifiedStringBuilder.the mixed quantity to format. mixed, StringBuffer the appendable destination. dest)Convenience method equivalent to |
| public abstract Quantity | Returns: the object parsed from the specified character sub-sequence.the csq, ParsePosition CharSequence to parse.the cursor holding the current parsing index. cursor)Redeclares javax. Parses a portion of the specified |
| public abstract Quantity | Returns: the object parsed from the specified character sub-sequence.the csq)CharSequence to parse.Redeclares javax. Parses a portion of the specified |
| protected abstract Quantity | Returns: the object parsed from the specified character sub-sequence.the csq, int CharSequence to parse.the current parsing index. index)Parses a portion of the specified |
| public final Quantity | parseObject(String
the source, ParsePosition String to parseA pos)ParsePosition object with index and error
index information as described above.Implements abstract java. Parses text from the given string to produce an object. |
| DEFAULT_DELIMITER | back to summary |
|---|---|
| protected static final String DEFAULT_DELIMITER The default delimiter. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| AbstractQuantityFormat | back to summary |
|---|---|
| public AbstractQuantityFormat() | |
| format | back to summary |
|---|---|
| public abstract Appendable format(Quantity<?> quantity, Appendable dest) throws IOException Redeclares javax. Formats the specified quantity into an
| |
| format | back to summary |
|---|---|
| public final StringBuffer format(Object obj, final StringBuffer toAppendTo, FieldPosition pos) Implements abstract java. Doc from java. Formats an object and appends the resulting text to a given string
buffer.
If the
| |
| format | back to summary |
|---|---|
| public final String format(Quantity<?> quantity) Implements javax. Formats an object to produce a string. This is equivalent to
| |
| format | back to summary |
|---|---|
| protected final StringBuffer format(ComparableQuantity<?> quantity, StringBuffer dest) Convenience method equivalent to
| |
| formatMixed | back to summary |
|---|---|
| protected abstract StringBuffer formatMixed(MixedQuantity<?> mixed, StringBuffer dest) Convenience method equivalent to
| |
| parse | back to summary |
|---|---|
| public abstract Quantity Redeclares javax. Parses a portion of the specified
| |
| parse | back to summary |
|---|---|
| public abstract Quantity Redeclares javax. Parses a portion of the specified
| |
| parse | back to summary |
|---|---|
| protected abstract Quantity Parses a portion of the specified
| |
| parseObject | back to summary |
|---|---|
| public final Quantity Implements abstract java. Doc from java. Parses text from the given string to produce an object.
This method attempts to parse text starting at the index given by
| |