public interface TruncationPolicy
TruncationPolicy is uniquely defined by the two elements
overflow mode and rounding
mode.
Truncation policies are are defined by UncheckedRounding and CheckedRounding.
Some special truncation policies are also defined by
| Modifier and Type | Field and Description |
|---|---|
static TruncationPolicy |
DEFAULT
Default truncation policy:
UncheckedRounding.HALF_UP. |
static Set<TruncationPolicy> |
VALUES
Unmodifiable set with all possible truncation policies.
|
| Modifier and Type | Method and Description |
|---|---|
OverflowMode |
getOverflowMode()
Returns the overflow mode which defines how to deal the situation when an
operation that causes an overflow.
|
RoundingMode |
getRoundingMode()
Returns the rounding mode which defines how to deal the situation when an
operation leads to truncation or rounding.
|
static final TruncationPolicy DEFAULT
UncheckedRounding.HALF_UP.static final Set<TruncationPolicy> VALUES
OverflowMode getOverflowMode()
RoundingMode getRoundingMode()