io.konik.jaxb.adapter.BigDecimalRoundingAdapter.scale=4 io.konik.jaxb.adapter.BigDecimalRoundingAdapter.roundingMode=HALF_UP
public class QuantityRoundingAdapter extends XmlAdapter<BigDecimal,BigDecimal>
Adapter to round the BigDecimal for marshalling to four decimals after the period.
The scale and rounding mode can be overridden via the configuration.
io.konik.jaxb.adapter.BigDecimalRoundingAdapter.scale=4 io.konik.jaxb.adapter.BigDecimalRoundingAdapter.roundingMode=HALF_UP
| Constructor and Description |
|---|
QuantityRoundingAdapter()
Instantiates a new amount rounding adapter.
|
| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
marshal(BigDecimal amount) |
BigDecimal |
unmarshal(BigDecimal amount) |
public QuantityRoundingAdapter()
Instantiates a new amount rounding adapter.
public BigDecimal marshal(BigDecimal amount) throws Exception
marshal in class XmlAdapter<BigDecimal,BigDecimal>Exceptionpublic BigDecimal unmarshal(BigDecimal amount) throws Exception
unmarshal in class XmlAdapter<BigDecimal,BigDecimal>ExceptionCopyright © 2014-2016 Konik.io. All Rights Reserved.