class DefaultQuantityFormat extends QuantityFormat
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
DefaultQuantityFormat() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Appendable |
format(javax.measure.Quantity measure,
java.lang.Appendable dest)
Formats the specified quantity into an
Appendable. |
ComparableQuantity<?> |
parse(java.lang.CharSequence csq)
Parses a portion of the specified
CharSequence from the specified position to produce an object. |
(package private) AbstractQuantity<?> |
parse(java.lang.CharSequence csq,
int index)
Parses a portion of the specified
CharSequence from the specified position to produce an object. |
ComparableQuantity<?> |
parse(java.lang.CharSequence csq,
java.text.ParsePosition cursor)
Parses a portion of the specified
CharSequence from the specified position to produce an object. |
format, format, getInstance, getInstance, getInstance, parseObjectprivate static final long serialVersionUID
public java.lang.Appendable format(javax.measure.Quantity measure,
java.lang.Appendable dest)
throws java.io.IOException
QuantityFormatAppendable.format in class QuantityFormatmeasure - the quantity to format.dest - the appendable destination.Appendable.java.io.IOException - if an I/O exception occurs.public ComparableQuantity<?> parse(java.lang.CharSequence csq, java.text.ParsePosition cursor) throws javax.measure.format.ParserException
QuantityFormatCharSequence from the specified position to produce an object. If parsing succeeds, then the index
of the cursor argument is updated to the index after the last character used.parse in class QuantityFormatcsq - the CharSequence to parse.cursor - the cursor holding the current parsing index.javax.measure.format.ParserExceptionAbstractQuantity<?> parse(java.lang.CharSequence csq, int index) throws javax.measure.format.ParserException
QuantityFormatCharSequence from the specified position to produce an object. If parsing succeeds, then the index
of the cursor argument is updated to the index after the last character used.parse in class QuantityFormatcsq - the CharSequence to parse.index - the current parsing index.javax.measure.format.ParserExceptionpublic ComparableQuantity<?> parse(java.lang.CharSequence csq) throws javax.measure.format.ParserException
QuantityFormatCharSequence from the specified position to produce an object. If parsing succeeds, then the index
of the cursor argument is updated to the index after the last character used.parse in interface tec.uom.lib.common.function.Parser<java.lang.CharSequence,ComparableQuantity>parse in class QuantityFormatcsq - the CharSequence to parse.javax.measure.format.ParserException