|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.data.units.Parser
public class Parser
Class for parsing unit specifications.
Field Summary | |
---|---|
protected static Parser |
parser
The singleton instance of this class. |
protected static UnitParser |
unitParser
The unit parser. |
Constructor Summary | |
---|---|
protected |
Parser()
Default constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final UnitParser unitParser
protected static final Parser parser
Constructor Detail |
---|
protected Parser()
Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |