Java Object Equal objectsEqual(Object obj1, Object obj2)

Here you can find the source of objectsEqual(Object obj1, Object obj2)

Description

objects Equal

License

Open Source License

Declaration

public static boolean objectsEqual(Object obj1, Object obj2) 

Method Source Code

//package com.java2s;
/**//  w  w w.ja v  a2 s .co  m
 * Copyright (c) 2003,2004 International Business Machines Corporation.
 * All Rights Reserved.
 *
 * This software is provided and licensed under the terms and conditions
 * of the Common Public License:
 * http://oss.software.ibm.com/developerworks/opensource/license-cpl.html
 */

public class Main {
    public static boolean objectsEqual(Object obj1, Object obj2) {
        if (obj1 == null) {
            return (obj2 == null);
        } else {
            return obj1.equals(obj2);
        }
    }
}

Related

  1. objectsEqual(final Object objectA, final Object objectB)
  2. objectsEqual(Object a, Object b)
  3. objectsEqual(Object lhs, Object rhs)
  4. objectsEqual(Object o1, Object o2)
  5. objectsEqual(Object o1, Object o2)
  6. objectsEqual(T a, T b)
  7. safeEquals(Object o1, Object o2)