protected static final class SimpleUnitFormat.ASCIIFormat extends SimpleUnitFormat.DefaultFormat
SimpleUnitFormat.ASCIIFormat, SimpleUnitFormat.DefaultFormat, SimpleUnitFormat.Flavor
nameToUnit, unitToName
Modifier | Constructor | Description |
---|---|---|
protected |
ASCIIFormat() |
Modifier and Type | Method | Description |
---|---|---|
Appendable |
format(javax.measure.Unit<?> unit,
Appendable appendable) |
Formats the specified unit.
|
protected boolean |
isValidIdentifier(String name) |
Indicates if the specified name can be used as unit identifier.
|
protected String |
nameFor(javax.measure.Unit<?> unit) |
|
String |
toString() |
|
protected javax.measure.Unit<?> |
unitFor(String name) |
format
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
format, getInstance, getInstance, isAllASCII, parseObject
alias, getSymbols, isUnitIdentifierPart, label, parse, parse, parse, parseProductUnit, parseSingleUnit, prefixFor
protected ASCIIFormat()
protected String nameFor(javax.measure.Unit<?> unit)
nameFor
in class SimpleUnitFormat.DefaultFormat
protected javax.measure.Unit<?> unitFor(String name)
unitFor
in class SimpleUnitFormat.DefaultFormat
public String toString()
toString
in class SimpleUnitFormat.DefaultFormat
public Appendable format(javax.measure.Unit<?> unit, Appendable appendable) throws IOException
SimpleUnitFormat
format
in class SimpleUnitFormat.DefaultFormat
unit
- the unit to format.appendable
- the appendable destination.appendable
, with formatted text appended.IOException
- if an error occurs.protected 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–2020 Units of Measurement project. All rights reserved.