protected static final class SimpleUnitFormat.ASCIIFormat extends SimpleUnitFormat.DefaultFormat
SimpleUnitFormat.ASCIIFormat, SimpleUnitFormat.DefaultFormat, SimpleUnitFormat.Flavor
Modifier | Constructor and Description |
---|---|
protected |
ASCIIFormat() |
Modifier and Type | Method and Description |
---|---|
Appendable |
format(javax.measure.Unit<?> unit,
Appendable appendable)
Formats the specified unit.
|
boolean |
isValidIdentifier(String name)
Indicates if the specified name can be used as unit identifier.
|
String |
nameFor(javax.measure.Unit<?> unit) |
javax.measure.Unit<?> |
unitFor(String name) |
alias, getSymbols, label, parse, parse, parse, parseProductUnit, parseSingleUnit
format, getInstance, getInstance, isAllASCII, isLocaleSensitive, parseObject
format
protected ASCIIFormat()
public String nameFor(javax.measure.Unit<?> unit)
nameFor
in class SimpleUnitFormat.DefaultFormat
public javax.measure.Unit<?> unitFor(String name)
unitFor
in class SimpleUnitFormat.DefaultFormat
public Appendable format(javax.measure.Unit<?> unit, Appendable appendable) throws 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.IOException
- if an error occurs.public boolean isValidIdentifier(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.Copyright © 2005-2017 Units of Measurement project. All Rights Reserved.