public class CustomBigDecimalComparator extends java.lang.Object implements CustomPropertyComparator<java.math.BigDecimal,ValueChange>
JaversBuilder.javers()
.registerCustomComparator(new CustomBigDecimalComparator(2), BigDecimal).build();
| Constructor and Description |
|---|
CustomBigDecimalComparator(int significantDecimalPlaces) |
| Modifier and Type | Method and Description |
|---|---|
ValueChange |
compare(java.math.BigDecimal left,
java.math.BigDecimal right,
GlobalId affectedId,
Property property) |
public CustomBigDecimalComparator(int significantDecimalPlaces)
public ValueChange compare(java.math.BigDecimal left, java.math.BigDecimal right, GlobalId affectedId, Property property)
compare in interface CustomPropertyComparator<java.math.BigDecimal,ValueChange>left - left (or old) property valueright - right (or current) property valueaffectedId - Id of domain object being comparedproperty - property being compared