FloatingPointLiteral from a char array.
This class should have a type parameter for the return value of its parse
methods. Unfortunately Java does not support type parameters for primitive
types. As a workaround we use long. A long has enough bits to
fit a double value or a float value.
See JavaDoubleParser for the grammar of FloatingPointLiteral.
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final long | Returns: the bit pattern of the parsed value, if the input is legal; otherwise,-1L.a string containing a str, int FloatingPointLiteralWithWhiteSpacestart offset of offset, int FloatingPointLiteralWithWhiteSpace in strlength of length)FloatingPointLiteralWithWhiteSpace in strParses a |
| private int | |
| pack-priv abstract long | Returns: the bit pattern of the parsed value, if the input is legal; otherwise,-1L.the string that contains the float literal (and maybe more) str, int the start index (inclusive) of the float literal
inside the string startIndex, int the end index (exclusive) of the float literal inside
the string endIndex, boolean whether the float value is negative isNegative, long the significand of the float value (can be truncated) significand, int the exponent of the float value exponent, boolean whether the significand is truncated isSignificandTruncated, int the exponent value of the truncated
significand exponentOfTruncatedSignificand)Computes a float value from the given components of a decimal float literal. |
| AbstractJsonFloatingPointBitsFromCharArray | back to summary |
|---|---|
| pack-priv AbstractJsonFloatingPointBitsFromCharArray() | |
| parseNumber | back to summary |
|---|---|
| public final long parseNumber(char[] str, int offset, int length) Parses a
See
| |
| tryToParseEightDigits | back to summary |
|---|---|
| private int tryToParseEightDigits(char[] str, int offset) | |
| valueOfFloatLiteral | back to summary |
|---|---|
| pack-priv abstract long valueOfFloatLiteral(char[] str, int startIndex, int endIndex, boolean isNegative, long significand, int exponent, boolean isSignificandTruncated, int exponentOfTruncatedSignificand) Computes a float value from the given components of a decimal float literal.
| |