| Modifier and Type | Field and Description |
|---|---|
| protected static final BigDecimal | LOWER
Lower allowed value |
| private static final Double | LOWER_DOUBLE
Lower allowed value as Double |
| protected static final BigDecimal | MIDDLE
The middle of the bad interval - used for rounding bad values |
| private static final String | SUSPICIOUS_DIGITS
Digit sequence to trigger the slow path |
| protected static final BigDecimal | TWO
Constant 2 |
| protected static final BigDecimal | UPPER
Upper allowed value |
| private static final Double | UPPER_DOUBLE
Upper allowed value as Double |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected static final double | Returns: the double valueSafe way of getting the double value prevents BigDecimal from calling Double.parseDouble() |
| protected static final double | Returns: the double valueSafe way of getting the double value Prevents BigDecimal from calling Double.parseDouble() |
| protected static final Double | Returns: The Double valueThe input String, can be null s)Safe parsing of a String into a Double |
| private static final String | |
| private static final boolean | Returns: true if the value is dangerous, false otherwiseThe big decimal value bd)Tests if the value is in the dangerous interval |
| protected static final boolean | Returns: true if the value is suspicious, false otherwiseThe non-null input String s)Heuristic test if we should look closer at the value |
| private static final Double | Returns: the double valueThe non-null input String s)Slow parsing of a suspicious value Rounding takes place if the value is inside the bad interval |
| LOWER | back to summary |
|---|---|
| protected static final BigDecimal LOWER Lower allowed value | |
| LOWER_DOUBLE | back to summary |
|---|---|
| private static final Double LOWER_DOUBLE Lower allowed value as Double | |
| MIDDLE | back to summary |
|---|---|
| protected static final BigDecimal MIDDLE The middle of the bad interval - used for rounding bad values | |
| SUSPICIOUS_DIGITS | back to summary |
|---|---|
| private static final String SUSPICIOUS_DIGITS Digit sequence to trigger the slow path | |
| TWO | back to summary |
|---|---|
| protected static final BigDecimal TWO Constant 2 | |
| UPPER | back to summary |
|---|---|
| protected static final BigDecimal UPPER Upper allowed value | |
| UPPER_DOUBLE | back to summary |
|---|---|
| private static final Double UPPER_DOUBLE Upper allowed value as Double | |
| SafeDecimalParser | back to summary |
|---|---|
| pack-priv SafeDecimalParser() | |
| decimalValue | back to summary |
|---|---|
| protected static final double decimalValue(Number number) Safe way of getting the double value
| |
| decimalValue | back to summary |
|---|---|
| protected static final double decimalValue(BigDecimal bigDecimal) Safe way of getting the double value
| |
| decimalValueOf | back to summary |
|---|---|
| protected static final Double decimalValueOf(String s) Safe parsing of a String into a Double | |
| digits | back to summary |
|---|---|
| private static final String digits(String s) Extract the digits from a numeric string | |
| isDangerous | back to summary |
|---|---|
| private static final boolean isDangerous(BigDecimal bd) Tests if the value is in the dangerous interval
| |
| isSuspicious | back to summary |
|---|---|
| protected static final boolean isSuspicious(String s) Heuristic test if we should look closer at the value
| |
| parseSafely | back to summary |
|---|---|
| private static final Double parseSafely(String s) Slow parsing of a suspicious value Rounding takes place if the value is inside the bad interval | |