| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static double |
| ConvertDouble | back to summary |
|---|---|
| public ConvertDouble() | |
| byteListToDouble | back to summary |
|---|---|
| public static double byteListToDouble(ByteList bytes, boolean strict) Converts supplied ByteList into a double. strict-mode will not like extra text non-numeric text or multiple sequention underscores. | |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private byte[] | |
| private char[] | |
| private int | |
| private int | |
| private static final int | |
| private int | |
| private boolean | |
| private static final int | |
| private static final int | |
| private double | |
| private static final int | |
| private int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private double | |
| private boolean | |
| public void | |
| private static boolean | |
| private boolean | |
| private static boolean | |
| private static boolean | |
| private byte | |
| public double | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | Returns: false to indicate we are not in an EOS conditionShift 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 | |
| private boolean | |
| private boolean | |
| private void | |
| private void |
| adjustExponent | back to summary |
|---|---|
| private int adjustExponent | |
| bytes | back to summary |
|---|---|
| private byte[] bytes | |
| chars | back to summary |
|---|---|
| private char[] chars | |
| charsIndex | back to summary |
|---|---|
| private int charsIndex | |
| endIndex | back to summary |
|---|---|
| private int endIndex | |
| EXPONENT_DIGITS_LIMIT | back to summary |
|---|---|
| private static final int EXPONENT_DIGITS_LIMIT | |
| index | back to summary |
|---|---|
| private int index | |
| isStrict | back to summary |
|---|---|
| private boolean isStrict | |
| MAX_EXPONENT | back to summary |
|---|---|
| private static final int MAX_EXPONENT | |
| MAX_LENGTH | back to summary |
|---|---|
| private static final int MAX_LENGTH | |
| result | back to summary |
|---|---|
| private double result | |
| SIGNIFICANT_DIGITS_LIMIT | back to summary |
|---|---|
| private static final int SIGNIFICANT_DIGITS_LIMIT | |
| significantDigitsProcessed | back to summary |
|---|---|
| private int significantDigitsProcessed | |
| wroteExponent | back to summary |
|---|---|
| private boolean wroteExponent | |
| DoubleConverter | back to summary |
|---|---|
| public DoubleConverter() | |
| addExponentToResult | back to summary |
|---|---|
| private void addExponentToResult(int exponent) | |
| addToResult | back to summary |
|---|---|
| private void addToResult(byte b) | |
| completeCalculation | back to summary |
|---|---|
| private double completeCalculation() | |
| eatUnderscores | back to summary |
|---|---|
| private boolean eatUnderscores() | |
| init | back to summary |
|---|---|
| public void init(ByteList list, boolean isStrict) | |
| isDigit | back to summary |
|---|---|
| private static boolean isDigit(byte b) | |
| isEOS | back to summary |
|---|---|
| private boolean isEOS() | |
| isExponent | back to summary |
|---|---|
| private static boolean isExponent(byte b) | |
| isWhitespace | back to summary |
|---|---|
| private static boolean isWhitespace(byte b) | |
| next | back to summary |
|---|---|
| private byte next() | |
| parse | back to summary |
|---|---|
| public double parse(ByteList list, boolean strict, boolean is19) Everything runs in 1.9+ mode now, so the `is19` parameter is vestigial. However, in order to maintain binary compatibility with extensions we can't just change the signature either. | |
| parseDecimalDigits | back to summary |
|---|---|
| private boolean parseDecimalDigits() | |
| parseDigits | back to summary |
|---|---|
| private boolean parseDigits() | |
| parseExponent | back to summary |
|---|---|
| private boolean parseExponent() | |
| parseOptionalSign | back to summary |
|---|---|
| private boolean parseOptionalSign() | |
| previous | back to summary |
|---|---|
| private boolean previous() Shift back to previous character in the incoming bytes
| |
| skipWhitespace | back to summary |
|---|---|
| private boolean skipWhitespace() Consume initial whitespace and underscores so that next character examined is not whitespace. 1.9 and strict do not allow leading underscores. Returns whether next position is at the end of the string or not. Trivia: " _ _ _ _ 1".to_f == 1.0 in Ruby 1.8 | |
| stopParsing | back to summary |
|---|---|
| private boolean stopParsing() | |
| strictError | back to summary |
|---|---|
| private boolean strictError() | |
| tooLargeExponent | back to summary |
|---|---|
| private boolean tooLargeExponent(boolean negativeFloat, boolean negativeExponent) | |
| verifyNumberAfterUnderscore | back to summary |
|---|---|
| private void verifyNumberAfterUnderscore() | |
| verifyOnlyNumbers | back to summary |
|---|---|
| private void verifyOnlyNumbers() | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Throwable | fillInStackTrace()
Overrides java. Fills in the execution stack trace. |
| LightweightNumberFormatException | back to summary |
|---|---|
| public LightweightNumberFormatException(String message) | |
| fillInStackTrace | back to summary |
|---|---|
| public Throwable fillInStackTrace() Overrides java. Doc from java. Fills in the execution stack trace. This method records within this
If the stack trace of this | |