Java Array Equal arraysEquals(Object[] mThis, Object[] mThat)

Here you can find the source of arraysEquals(Object[] mThis, Object[] mThat)

Description

arrays Equals

License

Open Source License

Declaration

private static boolean arraysEquals(Object[] mThis, Object[] mThat) 

Method Source Code

//package com.java2s;

public class Main {
    private static boolean arraysEquals(Object[] mThis, Object[] mThat) {
        if (mThis.length == mThat.length) {
            for (int i = 0; i < mThis.length; i++) {
                if (!((mThis[i] == null) && (mThat[i] == null))) {
                    if ((mThis[i] == null) || (mThat[i] == null) || (!mThis[i].equals(mThat[i]))) {
                        return false;
                    }/*from www  . java2s. com*/
                }
            }
            return true;
        } else {
            return false;
        }
    }
}

Related

  1. arraysEqual(String[] arr1, String[] arr2)
  2. arraysEqual(String[] one, String[] other)
  3. arraysEquals(byte[] a, byte[] b)
  4. arraysEquals(byte[] a, int ofsA, byte[] b, int ofsB, int len)
  5. arraysEquals(byte[] arr1, int offset1, byte[] arr2, int offset2)
  6. blobsAreEqual(byte[] blob1, byte[] blob2)
  7. bytesAreEqual(byte[] b1, byte[] b2)
  8. equal(boolean[][] a, boolean[][] b)
  9. equal(byte[] a, byte[] b)