io.konik.jaxb.adapter.BigDecimalRoundingAdapter.scale=4 io.konik.jaxb.adapter.BigDecimalRoundingAdapter.roundingMode=HALF_UP
public class QuantityRoundingAdapter extends javax.xml.bind.annotation.adapters.XmlAdapter<java.math.BigDecimal,java.math.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 |
|---|---|
java.math.BigDecimal |
marshal(java.math.BigDecimal amount) |
java.math.BigDecimal |
unmarshal(java.math.BigDecimal amount) |
public QuantityRoundingAdapter()
Instantiates a new amount rounding adapter.
public java.math.BigDecimal marshal(java.math.BigDecimal amount) throws java.lang.Exception
marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.math.BigDecimal,java.math.BigDecimal>java.lang.Exceptionpublic java.math.BigDecimal unmarshal(java.math.BigDecimal amount) throws java.lang.Exception
unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.math.BigDecimal,java.math.BigDecimal>java.lang.ExceptionCopyright © 2014-2015 Konik.io. All Rights Reserved.