Package javax.measure.unit
Class UnitFormat.ASCIIFormat
- java.lang.Object
-
- java.text.Format
-
- javax.measure.unit.UnitFormat
-
- javax.measure.unit.UnitFormat.DefaultFormat
-
- javax.measure.unit.UnitFormat.ASCIIFormat
-
- All Implemented Interfaces:
Serializable,Cloneable
- Enclosing class:
- UnitFormat
protected static class UnitFormat.ASCIIFormat extends UnitFormat.DefaultFormat
This class represents the ASCIIFormat format.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.measure.unit.UnitFormat
UnitFormat.ASCIIFormat, UnitFormat.DefaultFormat
-
Nested classes/interfaces inherited from class java.text.Format
Format.Field
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedASCIIFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Appendableformat(Unit<?> unit, Appendable appendable)Formats the specified unit.StringnameFor(Unit<?> unit)Unit<?>unitFor(String name)-
Methods inherited from class javax.measure.unit.UnitFormat.DefaultFormat
alias, isValidIdentifier, label, parseProductUnit, parseSingleUnit
-
Methods inherited from class javax.measure.unit.UnitFormat
format, getInstance, getInstance, getUCUMInstance, parseObject
-
Methods inherited from class java.text.Format
clone, format, formatToCharacterIterator, parseObject
-
-
-
-
Method Detail
-
nameFor
public String nameFor(Unit<?> unit)
- Overrides:
nameForin classUnitFormat.DefaultFormat
-
unitFor
public Unit<?> unitFor(String name)
- Overrides:
unitForin classUnitFormat.DefaultFormat
-
format
public Appendable format(Unit<?> unit, Appendable appendable) throws IOException
Description copied from class:UnitFormatFormats the specified unit.- Overrides:
formatin classUnitFormat.DefaultFormat- Parameters:
unit- the unit to format.appendable- the appendable destination.- Throws:
IOException- if an error occurs.
-
-