List of utility methods to do Object Equal
boolean | isEquals(Object object1, Object object2) is Equals if (object1 == object2) { return true; if (object1 == null || object2 == null) { return false; if (!object1.getClass().equals(object2.getClass())) { return false; ... |
boolean | nullSafeEquals(Object o1, Object o2) null Safe Equals if (o1 == o2) { return true; if (o1 == null || o2 == null) { return false; if (o1.equals(o2)) { return true; ... |
boolean | nullSafeEquals(Object o1, Object o2) Determine if the given objects are equal, returning true if both are null or false if only one is null .
if (o1 == o2) return true; if (o1 == null || o2 == null) return false; if (o1.equals(o2)) return true; if (o1 instanceof Object[] && o2 instanceof Object[]) return Arrays.equals((Object[]) o1, (Object[]) o2); ... |
boolean | objectsEqual(final Object objectA, final Object objectB) Compares two objects passed in for equality. if (objectA == null) return (objectB == null); return objectA.equals(objectB); |
boolean | objectsEqual(Object a, Object b) objects Equal if ((a == null) && (b == null)) { return true; if ((a == null) || (b == null)) { return false; return a.toString().equals(b.toString()); |
boolean | objectsEqual(Object lhs, Object rhs) Compare two objects in a null-safe manner. return (lhs == null) ? (rhs == null) : lhs.equals(rhs);
|
boolean | objectsEqual(Object o1, Object o2) Returns if two strings are equal. if (o1 == null) { if (o2 == null) return true; else return false; } else if (o2 == null) return false; else ... |
boolean | objectsEqual(Object o1, Object o2) Simple null-safe equality check return o1 == null ? o2 == null : o1.equals(o2);
|
boolean | objectsEqual(Object obj1, Object obj2) objects Equal if (obj1 == null) { return (obj2 == null); } else { return obj1.equals(obj2); |
boolean | objectsEqual(T a, T b) Compares if two objects are equal, handling the cases where one of both of them may be null return (a == b) || (a != null && a.equals(b));
|