public interface UnitFormat extends Parser<CharSequence,Unit<?>>
Formats instances of Unit to a String or an Appendable and parses a CharSequence to a Unit.
Unit,
Parser| Modifier and Type | Method and Description |
|---|---|
Appendable |
format(Unit<?> unit,
Appendable appendable)
Formats the specified unit.
|
Unit<?> |
parse(CharSequence csq)
Parses a portion of the specified
CharSequence from the
specified position to produce a unit. |
Appendable format(Unit<?> unit, Appendable appendable) throws IOException
unit - the unit to format.appendable - the appendable destination.IOException - if an error occurs while writing to the destination.Unit<?> parse(CharSequence csq) throws ParserException
CharSequence from the
specified position to produce a unit. If there is no unit to parse
the unitary unit (dimensionless) is returned.parse in interface Parser<CharSequence,Unit<?>>csq - the CharSequence to parse.ParserException - if any problem occurs while parsing the
specified character sequence (e.g. illegal syntax).Copyright © 2014–2015 Jean-Marie Dautelle, Werner Keil, V2COM. All rights reserved.