Class BigDecimalComparatorWithFixedEquals

  • All Implemented Interfaces:
    CustomValueComparator<java.math.BigDecimal>

    public class BigDecimalComparatorWithFixedEquals
    extends java.lang.Object
    implements CustomValueComparator<java.math.BigDecimal>
    Compares BigDecimals in the right way — ignoring trailing zeros.

    Usage example:
     JaversBuilder.javers()
         .registerValue(BigDecimal.class, new BigDecimalComparatorWithFixedEquals())
         .build();
     
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.math.BigDecimal a, java.math.BigDecimal b)
      Called by Javers to compare two Values.
      java.lang.String toString​(java.math.BigDecimal value)
      This method has two roles.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait