Separate out {Identity,Equality}QueuedNotificationManager
[yangtools.git] / common / util / src / main / java / org / opendaylight / yangtools / util / SingletonSet.java
index b809978ee0a879e9db2940a535b5d4ff7144037e..914268a45a21c74b3f4db06a05ce7561067d6128 100644 (file)
@@ -120,14 +120,7 @@ public abstract class SingletonSet<E> implements Set<E>, Immutable, Serializable
     @Override
     @SuppressWarnings("checkstyle:parameterName")
     public final boolean containsAll(final Collection<?> c) {
-        if (c.isEmpty()) {
-            return true;
-        }
-        if (c.size() != 1) {
-            return false;
-        }
-
-        return otherContains(c);
+        return c.isEmpty() || c.size() == 1 && otherContains(c);
     }
 
     @Override