Class AbstractBigDecimalParser
- Direct Known Subclasses:
JavaBigDecimalFromByteArray,JavaBigDecimalFromCharArray,JavaBigDecimalFromCharSequence
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThreshold on the number of input characters for selecting the algorithm optimised for few digits in the significand vs.protected static final intSeeJavaBigDecimalParser.protected static final long(package private) static final intThreshold on the number of digits for selecting the recursive algorithm instead of the iterative algorithm.Fields inherited from class ch.randelshofer.fastdoubleparser.AbstractNumberParser
CHAR_TO_HEX_MAP, DECIMAL_POINT_CLASS, ILLEGAL_OFFSET_OR_ILLEGAL_LENGTH, OTHER_CLASS, SYNTAX_ERROR, SYNTAX_ERROR_BITS, VALUE_EXCEEDS_LIMITS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcheckParsedBigDecimalBounds(boolean illegal, int index, int endIndex, int digitCount, long exponent) protected static booleanhasManyDigits(int length) Methods inherited from class ch.randelshofer.fastdoubleparser.AbstractNumberParser
charAt, charAt, charAt, checkBounds, checkBounds, lookupHex, lookupHex
-
Field Details
-
MANY_DIGITS_THRESHOLD
public static final int MANY_DIGITS_THRESHOLDThreshold on the number of input characters for selecting the algorithm optimised for few digits in the significand vs. the algorithm for many digits in the significand.Set this to
Integer.MAX_VALUEif you only want to use the algorithm optimised for few digits in the significand.Set this to
0if you only want to use the algorithm for long inputs.Rationale for choosing a specific threshold value: We speculate that we only need to use the algorithm for large inputs if there is zero chance, that we can parse the input with the algorithm for small inputs.
optional significant sign = 1 18 significant digits = 18 optional decimal point in significant = 1 optional exponent = 1 optional exponent sign = 1 10 exponent digits = 10
- See Also:
-
RECURSION_THRESHOLD
static final int RECURSION_THRESHOLDThreshold on the number of digits for selecting the recursive algorithm instead of the iterative algorithm.Set this to
Integer.MAX_VALUEif you only want to use the iterative algorithm.Set this to
0if you only want to use the recursive algorithm.Rationale for choosing a specific threshold value: The iterative algorithm has a smaller constant overhead than the recursive algorithm. We speculate that we break even somewhere at twice the threshold value.
- See Also:
-
MAX_EXPONENT_NUMBER
protected static final long MAX_EXPONENT_NUMBER- See Also:
-
MAX_DIGITS_WITHOUT_LEADING_ZEROS
protected static final int MAX_DIGITS_WITHOUT_LEADING_ZEROSSeeJavaBigDecimalParser.- See Also:
-
-
Constructor Details
-
AbstractBigDecimalParser
AbstractBigDecimalParser()
-
-
Method Details
-
hasManyDigits
protected static boolean hasManyDigits(int length) -
checkParsedBigDecimalBounds
protected static void checkParsedBigDecimalBounds(boolean illegal, int index, int endIndex, int digitCount, long exponent)
-