/**
 * Copyright (C) 2010-14 pvmanager developers. See COPYRIGHT.TXT
 * All rights reserved. Use is subject to license terms. See LICENSE.TXT
 */
package org.epics.pvmanager.util;

/**
 * Utility class to handle null values.
 *
 * @author carcassi
 */
public class NullUtils {

    /**
     * Returns true if both objects are null or they are equal.
     *
     * @param obj1 first object
     * @param obj2 second object
     * @return true if equals or both are null
     */
    public static boolean equalsOrBothNull(Object obj1, Object obj2) {
        if (obj1 == null)
            return obj2 == null;
        else
            return obj1.equals(obj2);
    }
}

@@ -174,16 +174,46 @@
 .util;%0A%0A
+import java.util.Collection;%0A%0A
 /**%0A * U
@@ -498,17 +498,94 @@
 l%0A     *
-/
+ @deprecated use Java7 method java.util.Objects.equals%0A     */%0A    @Deprecated
 %0A    pub
@@ -764,10 +764,412 @@
 ;%0A    %7D%0A
+    %0A    /**%0A     * Checks whether the collection contains a null value.%0A     * %0A     * @param args a collection; can't be null%0A     * @return true if one of the value is null%0A     */%0A    public static boolean containsNull(Collection%3CObject%3E args) %7B%0A        for (Object object : args) %7B%0A            if (object == null) %7B%0A                return true;%0A            %7D%0A        %7D%0A        return false;%0A    %7D%0A
 %7D%0A

update to current SNAPSHOT