public class Parser
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static Parser |
parser
The singleton instance of this class.
|
protected static UnitParser |
unitParser
The unit parser.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Parser()
Default constructor.
|
protected static final UnitParser unitParser
protected static final Parser parser
protected Parser()
public static Parser instance()
parse() is a class method.public static Unit parse(java.lang.String spec) throws ParseException, NoSuchUnitException
spec - The string unit-specification.ParseException - An error occurred while parsing the specification.UnitException - if spec requires an unsupported operation.NoSuchUnitExceptionpublic static void main(java.lang.String[] args)
throws ParseException,
UnitException
ParseExceptionUnitException