Package ch.randelshofer.fastdoubleparser
Class ConfigurableDoubleBitsFromCharArray
java.lang.Object
ch.randelshofer.fastdoubleparser.AbstractNumberParser
ch.randelshofer.fastdoubleparser.AbstractFloatValueParser
ch.randelshofer.fastdoubleparser.AbstractConfigurableFloatingPointBitsFromCharArray
ch.randelshofer.fastdoubleparser.ConfigurableDoubleBitsFromCharArray
final class ConfigurableDoubleBitsFromCharArray
extends AbstractConfigurableFloatingPointBitsFromCharArray
-
Field Summary
Fields inherited from class ch.randelshofer.fastdoubleparser.AbstractFloatValueParser
MAX_EXPONENT_NUMBER, MAX_INPUT_LENGTH, MINIMAL_NINETEEN_DIGIT_INTEGERFields 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
ConstructorsConstructorDescriptionConfigurableDoubleBitsFromCharArray(NumberFormatSymbols symbols, boolean ignoreCase) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescription(package private) longnan()(package private) long(package private) long(package private) longvalueOfFloatLiteral(char[] str, int integerStartIndex, int integerEndIndex, int fractionStartIndex, int fractionEndIndex, boolean isSignificandNegative, long significand, int exponent, boolean isSignificandTruncated, int exponentOfTruncatedSignificand, int exponentValue, int startIndex, int endIndex) Computes a float value from the given components of a decimal float literal.Methods inherited from class ch.randelshofer.fastdoubleparser.AbstractConfigurableFloatingPointBitsFromCharArray
parseFloatingPointLiteral, slowPathToDoubleMethods inherited from class ch.randelshofer.fastdoubleparser.AbstractNumberParser
charAt, charAt, charAt, checkBounds, checkBounds, lookupHex, lookupHex
-
Constructor Details
-
ConfigurableDoubleBitsFromCharArray
Creates a new instance.
-
-
Method Details
-
nan
long nan()- Specified by:
nanin classAbstractConfigurableFloatingPointBitsFromCharArray- Returns:
- a NaN constant in the specialized type wrapped in a
long
-
negativeInfinity
long negativeInfinity()- Specified by:
negativeInfinityin classAbstractConfigurableFloatingPointBitsFromCharArray- Returns:
- a negative infinity constant in the specialized type wrapped in a
long
-
positiveInfinity
long positiveInfinity()- Specified by:
positiveInfinityin classAbstractConfigurableFloatingPointBitsFromCharArray- Returns:
- a positive infinity constant in the specialized type wrapped in a
long
-
valueOfFloatLiteral
long valueOfFloatLiteral(char[] str, int integerStartIndex, int integerEndIndex, int fractionStartIndex, int fractionEndIndex, boolean isSignificandNegative, long significand, int exponent, boolean isSignificandTruncated, int exponentOfTruncatedSignificand, int exponentValue, int startIndex, int endIndex) Description copied from class:AbstractConfigurableFloatingPointBitsFromCharArrayComputes a float value from the given components of a decimal float literal.- Specified by:
valueOfFloatLiteralin classAbstractConfigurableFloatingPointBitsFromCharArray- Parameters:
str- the string that contains the float literal (and maybe more)integerStartIndex- the start index (inclusive) of the integer part of the significand inside the stringintegerEndIndex- the end index (exclusive) of the integer part of the significand the stringfractionStartIndex- the start index (inclusive) of the fraction part of the significand inside the stringfractionEndIndex- the end index (exclusive) of the fraction part of the significand the stringisSignificandNegative- whether the significand value is negativesignificand- the significand of the float value (can be truncated)exponent- the exponent of the float value considering the significandisSignificandTruncated- whether the significand is truncatedexponentOfTruncatedSignificand- the exponent value of the truncated significandexponentValue- the exponent of the float value without considering the significandstartIndex- the start index of the literal in strendIndex- the end index of the literal in str- Returns:
- the bit pattern of the parsed value, if the input is legal;
otherwise,
-1L.
-