List of utility methods to do Array Equal
boolean | equals(byte[] a1, byte[] a2) equals return Arrays.equals(a1, a2);
|
boolean | equals(byte[] data1, byte[] data2) equals return Arrays.equals(data1, data2);
|
boolean | equals(byte[] first, byte[] second) This function compares two byte arrays to see if they are equal. return Arrays.equals(first, second);
|
boolean | equals(byte[] first, byte[] second) equals return Arrays.equals(first, second);
|
boolean | equals(char[] left, int offsetLeft, char[] right, int offsetRight, int length) See if two array slices are the same. if ((offsetLeft + length <= left.length) && (offsetRight + length <= right.length)) { for (int i = 0; i < length; i++) { if (left[offsetLeft + i] != right[offsetRight + i]) { return false; return true; return false; |
boolean | equals(char[] left, int offsetLeft, char[] right, int offsetRight, int length) See if two array slices are the same. if ((offsetLeft + length <= left.length) && (offsetRight + length <= right.length)) { for (int i = 0; i < length; i++) { if (left[offsetLeft + i] != right[offsetRight + i]) { return false; return true; return false; |
boolean | equals(char[] str1, char[] str2) equals return Arrays.equals(str1, str2);
|
boolean | equals(char[][] c1, char[][] c2) Compares two two-dimensional char arrays for equalty. if (c1 == c2) return true; if (c1 == null || c2 == null) return false; int length = c1.length; if (c2.length != length) return false; for (int i = 0; i < length; i++) ... |
boolean | equals(Collection Compare a collection of strings to an array of strings. final List<String> asList = Arrays.asList(values); final boolean containsAll = asCollection.containsAll(asList); final int size = asCollection.size(); final int length = values.length; return containsAll && length == size; |
boolean | equals(double[][] xs, double[][] ys) Tests two double[][] arrays for having equal contents. if (xs == null) return ys == null; if (ys == null) return false; if (xs.length != ys.length) return false; for (int i = xs.length - 1; i >= 0; i--) { if (!Arrays.equals(xs[i], ys[i])) ... |