List of utility methods to do Object Compare
boolean | areEqual(final Object first, final Object second) are Equal return first.equals(second);
|
boolean | areEqual(final Object o1, final Object o2) Determines equality of the supplied objects by delegating to their hashCode methods. if (o1 == null) { return o2 == null; return o2 != null && (o1 == o2 || o1.getClass() == o2.getClass() && o1.hashCode() == o2.hashCode()); |
boolean | areEqual(final Object object0, final Object object1) Whether two objects are equal, without throwing a null pointer exception. if ((object0 == null) && (object1 == null)) { return true; if ((object0 == null) || (object1 == null)) { return false; return object0.equals(object1); |
boolean | areEqual(final Object x, final Object y) Returns true if the given objects are equal, namely, they are both null or they are equal by the equals() method. return x == null ? y == null : x.equals(y);
|
boolean | areEqual(final T object1, final T object2) Null safe comparison of instances, especially numerics like Integer. if (object1 == object2) { return true; if (object1 == null || object2 == null) { return false; if (object1.equals(object2)) { return true; ... |
boolean | areEqual(Object aThis, Object aThat) Equals for possibly-null object field. if (isArray(aThis) || isArray(aThat)) { throw new IllegalArgumentException("This method does not currently support arrays."); return aThis == null ? aThat == null : aThis.equals(aThat); |
boolean | areEqual(Object first, Object second) Compares two objects. if (first == second) { return true; } else { if (first != null && second != null) { return first.equals(second); return false; |
boolean | areEqual(Object first, Object second, boolean equalEvenIfBothNull) are Equal return (equalEvenIfBothNull ? areEqualEvenIfBothNull(first, second) : areEqual(first, second));
|
boolean | areEqual(Object o1, Object o2) are Equal return o1 == null ? o2 == null : o1.equals(o2);
|
boolean | areEqual(Object o1, Object o2) are Equal return !(o1 == null || o2 == null || !o1.equals(o2));
|