Java Object Equal objectsEqual(Object o1, Object o2)

Here you can find the source of objectsEqual(Object o1, Object o2)

Description

Simple null-safe equality check

License

Open Source License

Declaration

public static boolean objectsEqual(Object o1, Object o2) 

Method Source Code

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

public class Main {
    /** Simple null-safe equality check */
    public static boolean objectsEqual(Object o1, Object o2) {
        return o1 == null ? o2 == null : o1.equals(o2);
    }//from  w w  w  .j  a  v a2  s. c om
}

Related

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