MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / deepEquals

Method deepEquals

Ports/CLDC11/src/java/util/Arrays.java:1845–1860  ·  view source on GitHub ↗
(Object[] array1, Object[] array2)

Source from the content-addressed store, hash-verified

1843 /// same length and the elements at each index in the two arrays are
1844 /// equal according to `equals()`, `false` otherwise.
1845 public static boolean deepEquals(Object[] array1, Object[] array2) {
1846 if (array1 == array2) {
1847 return true;
1848 }
1849 if (array1 == null || array2 == null || array1.length != array2.length) {
1850 return false;
1851 }
1852 for (int i = 0; i < array1.length; i++) {
1853 Object e1 = array1[i], e2 = array2[i];
1854
1855 if (!deepEqualsElements(e1, e2)) {
1856 return false;
1857 }
1858 }
1859 return true;
1860 }
1861
1862 private static boolean deepEqualsElements(Object e1, Object e2) {
1863 Class<?> cl1, cl2;

Callers 1

deepEqualsMethod · 0.95

Calls 1

deepEqualsElementsMethod · 0.95

Tested by

no test coverage detected