Package org.apache.batik.parser
Class NumberParser
- java.lang.Object
-
- org.apache.batik.parser.AbstractParser
-
- org.apache.batik.parser.NumberParser
-
- All Implemented Interfaces:
Localizable,Parser
- Direct Known Subclasses:
AngleParser,FragmentIdentifierParser,NumberListParser,PathParser,PointsParser,TransformListParser
public abstract class NumberParser extends AbstractParser
This class represents a parser with support for numbers.- Version:
- $Id: NumberParser.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description private static double[]pow10Array of powers of ten.-
Fields inherited from class org.apache.batik.parser.AbstractParser
BUNDLE_CLASSNAME, current, errorHandler, localizableSupport, reader
-
-
Constructor Summary
Constructors Constructor Description NumberParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static floatbuildFloat(int mant, int exp)Computes a float from mantissa and exponent.protected floatparseFloat()Parses the content of the buffer and converts it to a float.-
Methods inherited from class org.apache.batik.parser.AbstractParser
createErrorMessage, doParse, formatMessage, getBundleClassName, getCurrent, getLocale, parse, parse, parse, reportCharacterExpectedError, reportError, reportUnexpectedCharacterError, setErrorHandler, setLocale, skipCommaSpaces, skipSpaces
-
-
-
-
Method Detail
-
parseFloat
protected float parseFloat() throws ParseException, java.io.IOExceptionParses the content of the buffer and converts it to a float.- Throws:
ParseExceptionjava.io.IOException
-
buildFloat
public static float buildFloat(int mant, int exp)Computes a float from mantissa and exponent.
-
-