Java Object Equal Equals(Object in1, Object in2)

Here you can find the source of Equals(Object in1, Object in2)

Description

Equals

License

Open Source License

Declaration

public static final boolean Equals(Object in1, Object in2) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static final boolean Equals(Object in1, Object in2) {
        if (in1 instanceof int[])
            return Arrays.equals((int[]) in1, (int[]) in2);
        else {//from  w  ww.  ja  va  2 s . c  o m
            if (((Object[]) in1).length != ((Object[]) in2).length)
                return false;
            for (int i = 0, s = ((Object[]) in1).length; i < s; i++)
                if (!Equals(((Object[]) in1)[i], ((Object[]) in2)[i]))
                    return false;
            return true;
        }
    }
}

Related

  1. deepEquals(Object o1, Object o2)
  2. equalObjects(Object object1, Object object2)
  3. equals(BSONObject a, BSONObject b)
  4. equals(final Object a, final Object b)
  5. equals(Object a, Object b)
  6. equals(Object o1, Object o2)
  7. equals(Object o1, Object o2)
  8. equals(Object o1, Object o2)
  9. equals(Object object1, Object object2)