public static class ConvertDouble.DoubleConverter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int |
adjustExponent |
private byte[] |
bytes |
private char[] |
chars |
private int |
charsIndex |
private int |
endIndex |
private static int |
EXPONENT_DIGITS_LIMIT |
private int |
index |
private boolean |
is19 |
private boolean |
isStrict |
private static int |
MAX_EXPONENT |
private static int |
MAX_LENGTH |
private double |
result |
private static int |
SIGNIFICANT_DIGITS_LIMIT |
private int |
significantDigitsProcessed |
private boolean |
wroteExponent |
| Constructor and Description |
|---|
DoubleConverter() |
| Modifier and Type | Method and Description |
|---|---|
private void |
addExponentToResult(int exponent) |
private void |
addToResult(byte b) |
private double |
completeCalculation() |
private boolean |
eatUnderscores() |
void |
init(org.jruby.util.ByteList list,
boolean isStrict,
boolean is19) |
private boolean |
isDigit(byte b) |
private boolean |
isEOS() |
private boolean |
isExponent(byte b) |
private boolean |
isWhitespace(byte b) |
private byte |
next() |
double |
parse(org.jruby.util.ByteList list,
boolean strict,
boolean is19) |
private boolean |
parseDecimalDigits() |
private boolean |
parseDigits() |
private boolean |
parseExponent() |
private boolean |
parseOptionalSign() |
private boolean |
previous()
Shift back to previous character in the incoming bytes
|
private boolean |
skipWhitespace()
Consume initial whitespace and underscores so that next character
examined is not whitespace.
|
private boolean |
stopParsing() |
private boolean |
strictError() |
private boolean |
tooLargeExponent(boolean negativeFloat,
boolean negativeExponent) |
private void |
verifyNumberAfterUnderscore() |
private byte[] bytes
private int index
private int endIndex
private boolean isStrict
private boolean is19
private char[] chars
private int charsIndex
private int significantDigitsProcessed
private int adjustExponent
private boolean wroteExponent
private double result
private static final int SIGNIFICANT_DIGITS_LIMIT
private static final int EXPONENT_DIGITS_LIMIT
private static final int MAX_EXPONENT
private static final int MAX_LENGTH
public void init(org.jruby.util.ByteList list,
boolean isStrict,
boolean is19)
private byte next()
private boolean previous()
private boolean isEOS()
private boolean stopParsing()
private boolean isDigit(byte b)
private boolean isExponent(byte b)
private boolean isWhitespace(byte b)
private void addToResult(byte b)
private void addExponentToResult(int exponent)
private boolean eatUnderscores()
private double completeCalculation()
private boolean strictError()
public double parse(org.jruby.util.ByteList list,
boolean strict,
boolean is19)
private boolean skipWhitespace()
private boolean parseOptionalSign()
private boolean parseDigits()
private boolean parseDecimalDigits()
private boolean parseExponent()
private boolean tooLargeExponent(boolean negativeFloat,
boolean negativeExponent)
private void verifyNumberAfterUnderscore()