See: Description
Interface | Description |
---|---|
DecimalAppender |
This interface represents a handler for decimal numbers, and defines how they should be appended in various forms.
|
Decimaliser |
Provides functionality for converting floating-point values (double and float) into a
decimal representation that can be appended to a target.
|
Class | Description |
---|---|
GeneralDecimaliser |
A versatile implementation of
Decimaliser which employs a hybrid approach to convert floating-point numbers
to decimal representation. |
MaximumPrecision |
Implementation of
Decimaliser that converts floating-point numbers to decimal representation with a specified
maximum number of decimal places. |
SimpleDecimaliser |
A light-weight implementation of
Decimaliser , which employs a simple rounding technique for converting floating-point
numbers to decimal representation. |
StandardDecimaliser |
Implementation of
Decimaliser that converts floating-point numbers to their decimal representation in
standard form. |
UsesBigDecimal |
An implementation of
Decimaliser that uses BigDecimal for higher-precision conversions of floating-point
numbers to decimal representation. |
Classes in this package include:
StandardDecimaliser
- An implementation that produces numbers
in standard form, ensuring that large numbers are represented in full, while small values are rounded to 18 decimal places.SimpleDecimaliser
- A light-weight implementation
that employs simple rounding techniques. This implementation is optimized for performance and simplicity,
making it useful in scenarios where performance is a higher priority than precision.GeneralDecimaliser
- A general implementation that initially
attempts conversion using a light-weight strategy and falls back to the BigDecimal-based strategy if necessary.UsesBigDecimal
- A BigDecimal-based implementation that
is used for higher precision conversions. This is useful in scenarios where precision is a higher priority
than performance.MaximumPrecision
- An implementation that maintains
a maximum precision during conversion, ensuring that numbers are converted using only that precision.These classes are used to convert floating-point numbers into a string representation that is optimized for either performance or precision, depending on the use case requirements.
Copyright © 2023. All rights reserved.