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.Exception
public 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.Exception
Copyright © 2014-2018 Konik.io. All Rights Reserved.