public class GeneralDecimaliser extends Object implements Decimaliser
SimpleDecimaliser and then
UsesBigDecimal if more precision is needed.
Values outside the range [1e-29, 1e45) are rejected.| Modifier and Type | Field and Description |
|---|---|
static Decimaliser |
GENERAL
Preferred entry point combining lightweight and
BigDecimal strategies. |
| Constructor and Description |
|---|
GeneralDecimaliser() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
toDecimal(double value,
DecimalAppender decimalAppender)
Convert
value using the simple decimaliser then fall back to
UsesBigDecimal if necessary. |
boolean |
toDecimal(float value,
DecimalAppender decimalAppender)
Convert
value using the simple decimaliser then fall back to
UsesBigDecimal if necessary. |
public static final Decimaliser GENERAL
BigDecimal strategies.
This singleton is stateless and thread-safe.public boolean toDecimal(double value,
DecimalAppender decimalAppender)
value using the simple decimaliser then fall back to
UsesBigDecimal if necessary.
Values outside [1e-29, 1e45) are rejected.toDecimal in interface Decimaliservalue - the double value to serialise; must be finite and not negative zerodecimalAppender - the target receiving sign, mantissa and exponenttrue if the value could be represented and appendedpublic boolean toDecimal(float value,
DecimalAppender decimalAppender)
value using the simple decimaliser then fall back to
UsesBigDecimal if necessary. Values with absolute value below
1e-29f are rejected.toDecimal in interface Decimaliservalue - the float value to serialise; must be finite and not negative zerodecimalAppender - the target receiving sign, mantissa and exponenttrue if the value could be represented and appendedCopyright © 2026 Chronicle Software Ltd. All rights reserved.