protected static final class SimpleUnitFormat.ASCIIFormat extends SimpleUnitFormat.DefaultFormat
SimpleUnitFormat.ASCIIFormat, SimpleUnitFormat.DefaultFormat, SimpleUnitFormat.Flavor
_nameToUnit, _unitToName
Modifier | Constructor and Description |
---|---|
protected |
ASCIIFormat() |
Modifier and Type | Method and Description |
---|---|
java.lang.Appendable |
format(javax.measure.Unit<?> unit,
java.lang.Appendable appendable)
Formats the specified unit.
|
boolean |
isValidIdentifier(java.lang.String name)
Indicates if the specified name can be used as unit identifier.
|
java.lang.String |
nameFor(javax.measure.Unit<?> unit) |
javax.measure.Unit<?> |
unitFor(java.lang.String name) |
alias, getSymbols, isUnitIdentifierPart, label, parse, parse, parse, parseProductUnit, parseSingleUnit
format, getInstance, getInstance, isAllASCII, isLocaleSensitive, parseObject
format, format
public java.lang.String nameFor(javax.measure.Unit<?> unit)
nameFor
in class SimpleUnitFormat.DefaultFormat
public javax.measure.Unit<?> unitFor(java.lang.String name)
unitFor
in class SimpleUnitFormat.DefaultFormat
public java.lang.Appendable format(javax.measure.Unit<?> unit, java.lang.Appendable appendable) throws java.io.IOException
SimpleUnitFormat
format
in interface javax.measure.format.UnitFormat
format
in class SimpleUnitFormat.DefaultFormat
unit
- the unit to format.appendable
- the appendable destination.appendable
, with formatted text appended.java.io.IOException
- if an error occurs.public boolean isValidIdentifier(java.lang.String name)
SimpleUnitFormat
isValidIdentifier
in class SimpleUnitFormat.DefaultFormat
name
- the identifier to be tested.true
if the name specified can be used as label or alias for this format;false
otherwise.