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.
|
Modifier and Type | Method and Description |
---|---|
static Parser |
instance()
Obtain the singleton instance of this class.
|
static void |
main(String[] args)
Test this class.
|
static Unit |
parse(String spec)
Parse a string unit-specification.
|
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(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.NoSuchUnitException
public static void main(String[] args) throws ParseException, UnitException
ParseException
UnitException
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.