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 protected
ASCIIFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Appendable
format(Unit<?> unit, Appendable appendable)
Formats the specified unit.String
nameFor(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:
nameFor
in classUnitFormat.DefaultFormat
-
unitFor
public Unit<?> unitFor(String name)
- Overrides:
unitFor
in classUnitFormat.DefaultFormat
-
format
public Appendable format(Unit<?> unit, Appendable appendable) throws IOException
Description copied from class:UnitFormat
Formats the specified unit.- Overrides:
format
in classUnitFormat.DefaultFormat
- Parameters:
unit
- the unit to format.appendable
- the appendable destination.- Throws:
IOException
- if an error occurs.
-
-