Java Object Compare areEqualEvenIfBothNull(Object first, Object second)

Here you can find the source of areEqualEvenIfBothNull(Object first, Object second)

Description

are Equal Even If Both Null

License

Apache License

Declaration

private static boolean areEqualEvenIfBothNull(Object first, Object second) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static boolean areEqualEvenIfBothNull(Object first, Object second) {
        return ((first == null && second == null) || (first != null && second != null && first.equals(second)));
    }/*from   w ww.  j a v  a  2 s  .co  m*/
}

Related

  1. areEqual(Object value, Object otherValue)
  2. areEqual(Object value1, Object value2)
  3. areEqual(T obj1, T obj2)
  4. areEqual(T obj1, V obj2)
  5. areEqualComparables(T object1, T object2)
  6. areEquals(final Object o1, final Object o2)
  7. areEquals(Object a, Object b)
  8. areEquals(Object arg0, Object arg1)
  9. areEquals(Object... objs)