/** * Test the equality of two object arrays. * * @param a The first array. * @param b The second array. * @return True if arrays are equal. */ public static boolean equals(final Object[] a, final Object[] b) { return equals(a, b, true); }
/** * Test the equality of an object with this. * * @param obj Object to test equality with. * @return True if object is equal. */ public boolean equals(final Object obj) { if (obj == this) return true; if (obj != null && obj.getClass() == getClass()) { CompoundKey key = (CompoundKey)obj; return Objects.equals(key.elements, elements); } return false; }
if (deep) { if (x instanceof Object[] && y instanceof Object[]) { if (! equals((Object[])x, (Object[])y, true)) return false;
if (equals(Array.get(first, i), Array.get(second, i)) == false) return false;