Skip navigation links

Package com.fasterxml.jackson.core.io.doubleparser

Provides parsers that parse a FloatingPointLiteral from a CharSequence, char array, or byte array (str);.

See: Description

Package com.fasterxml.jackson.core.io.doubleparser Description

Provides parsers that parse a FloatingPointLiteral from a CharSequence, char array, or byte array (str);.

Leading and trailing whitespace characters in str are ignored. Whitespace is removed as if by the String.trim() method; that is, characters in the range [U+0000,U+0020].

The rest of str should constitute a FloatingPointLiteral as described by the lexical syntax rules shown below:

FloatingPointLiteral:
[Sign] NaN
[Sign] Infinity
[Sign] DecimalFloatingPointLiteral
[Sign] HexFloatingPointLiteral
SignedInteger
HexFloatingPointLiteral:
HexSignificand BinaryExponent [FloatTypeSuffix]
HexSignificand:
HexNumeral
HexNumeral .
0x [HexDigits] . HexDigits
0X [HexDigits] . HexDigits
BinaryExponent:
BinaryExponentIndicator SignedInteger
BinaryExponentIndicator:
p
P
DecimalFloatingPointLiteral:
DecSignificand [DecExponent] [FloatTypeSuffix]
DecSignificand:
Digits . [Digits]
. Digits
Digits
DecExponent:
ExponentIndicator SignedInteger
ExponentIndicator:
(one of)
e E
SignedInteger:
[Sign] Digits
Sign:
(one of)
+ -
Digits:
Digit {Digit}
HexNumeral:
0 x HexDigits
0 X HexDigits
HexDigits:
HexDigit {HexDigit}
HexDigit:
(one of)
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
FloatTypeSuffix:
(one of)
f F d D

References:

The Java® Language Specification, Java SE 18 Edition, Chapter 3. Lexical Structure, 3.10.2. Floating-Point Literals
docs.oracle.com
Skip navigation links

Copyright © 2008–2022 FasterXML. All rights reserved.