List of utility methods to do Object Compare
boolean | areEqual(Object value, Object otherValue) A comprehensive isEqual method that handles nulls and arrays safely. if (value == otherValue) { return true; if (value == null) { return false; if (otherValue == null) { return false; ... |
boolean | areEqual(Object value1, Object value2) Compares the two given values by taking null and NaN values into account. Two null values will be considered equal. return ((value1 == null) && (value2 == null)) || (isNaN(value1) && isNaN(value2))
|| ((value1 != null) && value1.equals(value2));
|
boolean | areEqual(T obj1, T obj2) are Equal return (obj1 != null) && obj1.equals(obj2);
|
void | areEqual(T obj1, V obj2) are Equal areEqual(obj1, obj2, "The object is not equal.");
|
boolean | areEqualComparables(T object1, T object2) are Equal Comparables if (object1 == null) { return (object2 == null); } else if (object2 == null) { return false; return (object1.compareTo(object2) == 0); |
boolean | areEqualEvenIfBothNull(Object first, Object second) are Equal Even If Both Null return ((first == null && second == null) || (first != null && second != null && first.equals(second)));
|
boolean | areEquals(final Object o1, final Object o2) Utility method for equals() methods.
return (o1 == o2) || (o1 != null && o1.equals(o2));
|
boolean | areEquals(Object a, Object b) are Equals if (a == null) { return b == null; return a.equals(b); |
boolean | areEquals(Object arg0, Object arg1) Checks if the given objects are equals using the Object#equals(Object) method or the == operator if the first argument is null .
if (arg0 != null && arg1 != null) { return arg0.equals(arg1); return arg0 == arg1; |
boolean | areEquals(Object... objs) are Equals boolean areEquals = true; if (objs != null && objs.length > 1) { for (int i = 0; i < objs.length - 1 && areEquals; i++) { areEquals &= (objs[i] == null && objs[i + 1] == null) || (objs[i] != null && objs[i].equals(objs[i + 1])); return areEquals; ... |