Package de.timmfitschen.easyunits.parser
Class DefaultCompoundUnitParser
- java.lang.Object
-
- de.timmfitschen.easyunits.parser.DefaultCompoundUnitParser
-
- All Implemented Interfaces:
CompoundUnitParser
public class DefaultCompoundUnitParser extends Object implements CompoundUnitParser
-
-
Constructor Summary
Constructors Constructor Description DefaultCompoundUnitParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getNextExponent(char[] cs, int pos)
protected String
getNextUnit(char[] cs, int pos)
protected CompoundUnit
parseCompound(Map<String,Unit> allunits, char[] cs, int[] status)
CompoundUnit
parseCompound(Map<String,Unit> allunits, String unit)
protected int
parseExponent(char[] cs, int[] status)
protected Unit
parseSubExpression(Map<String,Unit> allunits, char[] cs, int[] status)
-
-
-
Method Detail
-
parseSubExpression
protected Unit parseSubExpression(Map<String,Unit> allunits, char[] cs, int[] status) throws UnknownUnitException, ParserException
- Throws:
UnknownUnitException
ParserException
-
parseExponent
protected int parseExponent(char[] cs, int[] status) throws ParserException
- Throws:
ParserException
-
parseCompound
public CompoundUnit parseCompound(Map<String,Unit> allunits, String unit) throws UnknownUnitException, ParserException
- Specified by:
parseCompound
in interfaceCompoundUnitParser
- Throws:
UnknownUnitException
ParserException
-
parseCompound
protected CompoundUnit parseCompound(Map<String,Unit> allunits, char[] cs, int[] status) throws UnknownUnitException, ParserException
- Throws:
UnknownUnitException
ParserException
-
getNextExponent
protected String getNextExponent(char[] cs, int pos) throws ParserException
- Throws:
ParserException
-
getNextUnit
protected String getNextUnit(char[] cs, int pos)
-
-