public interface QuantityFormat
Quantity.
Quantity| Modifier and Type | Method | Description |
|---|---|---|
String |
format(Quantity<?> quantity) |
Formats the specified
Quantity. |
Appendable |
format(Quantity<?> quantity,
Appendable destination) |
Formats the specified quantity into an
Appendable. |
default boolean |
isLocaleSensitive() |
|
Quantity<?> |
parse(CharSequence csq) |
Parses a portion of the specified
CharSequence from the specified position to produce a Quantity. |
Quantity<?> |
parse(CharSequence csq,
ParsePosition pos) |
Parses a portion of the specified
CharSequence from the specified position to produce a Quantity. |
Appendable format(Quantity<?> quantity, Appendable destination) throws IOException
Appendable.quantity - the quantity to format.destination - the appendable destination.Appendable.IOException - if an I/O exception occurs.String format(Quantity<?> quantity)
Quantity.quantity - the Quantity to format, not nullQuantityFormat.Quantity<?> parse(CharSequence csq, ParsePosition pos) throws IllegalArgumentException, MeasurementParseException
CharSequence from the specified position to produce a Quantity.
If parsing succeeds, then the index of the pos argument is updated to the index after the last character used.csq - the CharSequence to parse.pos - a ParsePosition object holding the current parsing index and error parsing index information as described above.IllegalArgumentException - if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).MeasurementParseExceptionQuantity<?> parse(CharSequence csq) throws MeasurementParseException
CharSequence from the specified position to produce a Quantity.csq - the CharSequence to parse.IllegalArgumentException - if any problem occurs while parsing the specified character sequence (e.g. illegal syntax).MeasurementParseExceptiondefault boolean isLocaleSensitive()
true if this QuantityFormat depends on a Locale to perform its tasks.
In environments that do not support a Locale, e.g. Java ME, this usually returns false.
Copyright © 2014–2019 Jean-Marie Dautelle, Werner Keil, Otavio Santana. All rights reserved.