-
- All Implemented Interfaces:
public class ObjectUtil
-
-
Field Summary
Fields Modifier and Type Field Description public final static ObjectUtilINSTANCE
-
Method Summary
Modifier and Type Method Description final BooleanareEqual(Object o1, Object o2)There are situations when two objects are different via equals but are the same via Comparable.compareTo (e.g . -
-
Method Detail
-
areEqual
final Boolean areEqual(Object o1, Object o2)
There are situations when two objects are different via equals but are the same via Comparable.compareTo (e.g .BigDecimal with different scaling factor).
That's why we provide a utility method which tries to compare arguments via Comparable.compareTo if possible and falls back to equals otherwise.
-
-
-
-