|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.text.Format
javax.measure.unit.UnitFormat
javax.measure.unit.format.UCUMFormat
public abstract class UCUMFormat
This class provides the interface for formatting and parsing
units according to the Uniform Code for Units of Measure
(UCUM).
For a technical/historical overview of this format please read Units of Measure in Clinical Information Systems.
As of revision 1.16, the BNF in the UCUM standard contains an error. I've attempted to work around the problem by modifying the BNF productions for <Term>. Once the error in the standard is corrected, it may be necessary to modify the productions in the UCUMParser.jj file to conform to the standard.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.text.Format |
|---|
java.text.Format.Field |
| Method Summary | |
|---|---|
java.lang.Appendable |
format(Unit<?> unit,
java.lang.Appendable appendable)
Formats the specified unit. |
static UCUMFormat |
getCaseInsensitiveInstance()
Returns the instance for formatting and parsing using case insensitive symbols |
static UCUMFormat |
getCaseInsensitiveInstance(SymbolMap symbolMap)
Returns a case insensitive instance for formatting and parsing using user defined symbols |
static UCUMFormat |
getCaseSensitiveInstance()
Returns the instance for formatting and parsing using case sensitive symbols |
static UCUMFormat |
getCaseSensitiveInstance(SymbolMap symbolMap)
Returns a case sensitive instance for formatting and parsing using user defined symbols |
static UCUMFormat |
getPrintInstance()
Returns the instance for formatting using "print" symbols |
static UCUMFormat |
getPrintInstance(SymbolMap symbolMap)
Returns the instance for formatting using user defined symbols |
| Methods inherited from class javax.measure.unit.UnitFormat |
|---|
format, format, getInstance, getInstance, getStandard, parse, parseObject |
| Methods inherited from class java.text.Format |
|---|
clone, format, formatToCharacterIterator, parseObject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static UCUMFormat getPrintInstance()
public static UCUMFormat getPrintInstance(SymbolMap symbolMap)
public static UCUMFormat getCaseSensitiveInstance()
public static UCUMFormat getCaseSensitiveInstance(SymbolMap symbolMap)
public static UCUMFormat getCaseInsensitiveInstance()
public static UCUMFormat getCaseInsensitiveInstance(SymbolMap symbolMap)
public java.lang.Appendable format(Unit<?> unit,
java.lang.Appendable appendable)
throws java.io.IOException
UnitFormat
format in class UnitFormatunit - the unit to format.appendable - the appendable destination.
java.io.IOException - if an error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||