Top Fields Constructors Methods
ch.randelshofer.fastdoubleparser

pack-priv Class JavaBigIntegerFromCharSequence

extends AbstractNumberParser
Class Inheritance
Imports
java.math.BigInteger, java.util.Map

Field Summary

Modifier and TypeField and Description
private static final int
MAX_DECIMAL_DIGITS

The resulting value must fit into 2^31 - 1 bits.

private static final int
MAX_HEX_DIGITS

The resulting value must fit into 2^31 - 1 bits.

public static final int
Inherited from ch.randelshofer.fastdoubleparser.AbstractNumberParser:
CHAR_TO_HEX_MAPDECIMAL_POINT_CLASSILLEGAL_OFFSET_OR_ILLEGAL_LENGTHOTHER_CLASSSYNTAX_ERRORVALUE_EXCEEDS_LIMITS

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public BigInteger

Returns:

result (always non-null)
parseBigIntegerLiteral
(CharSequence str, int offset, int length, int radix)

Parses a BigIntegerLiteral as specified in JavaBigIntegerParser.

private BigInteger
parseDecDigits(CharSequence str, int from, int to, boolean isNegative)

private BigInteger
parseHexDigits(CharSequence str, int from, int to, boolean isNegative)

private BigInteger
parseManyDecDigits(CharSequence str, int from, int to, boolean isNegative)

private int
skipZeroes(CharSequence str, int from, int to)

Inherited from ch.randelshofer.fastdoubleparser.AbstractNumberParser:
charAtcharAtcharAtlookupHexlookupHex

Field Detail

MAX_DECIMAL_DIGITSback to summary
private static final int MAX_DECIMAL_DIGITS

The resulting value must fit into 2^31 - 1 bits. The decimal representation of 2^31 - 1 has 646,456,993 digits.

MAX_HEX_DIGITSback to summary
private static final int MAX_HEX_DIGITS

The resulting value must fit into 2^31 - 1 bits. The hexadecimal representation of 2^31 - 1 has 536870912 digits.

MAX_INPUT_LENGTHback to summary
public static final int MAX_INPUT_LENGTH

Constructor Detail

JavaBigIntegerFromCharSequenceback to summary
pack-priv JavaBigIntegerFromCharSequence()

Method Detail

parseBigIntegerLiteralback to summary
public BigInteger parseBigIntegerLiteral(CharSequence str, int offset, int length, int radix) throws NumberFormatException

Parses a BigIntegerLiteral as specified in JavaBigIntegerParser.

Returns:BigInteger

result (always non-null)

Exceptions
NumberFormatException:
if parsing fails
parseDecDigitsback to summary
private BigInteger parseDecDigits(CharSequence str, int from, int to, boolean isNegative)
parseHexDigitsback to summary
private BigInteger parseHexDigits(CharSequence str, int from, int to, boolean isNegative)
parseManyDecDigitsback to summary
private BigInteger parseManyDecDigits(CharSequence str, int from, int to, boolean isNegative)
skipZeroesback to summary
private int skipZeroes(CharSequence str, int from, int to)