Simplify method

Change-Id: I3d04245fb5462e0750c3bcfa687946742d44644f
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java
index 061cf14..99352ac 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java
@@ -97,8 +97,7 @@
 
     @Override
     public boolean containsAny(Set<DiscreteResource> other) {
-        return other.stream()
-                .anyMatch(x -> values().contains(x));
+        return !Sets.intersection(this.values(), other).isEmpty();
     }
 
     @Override
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/GenericDiscreteResources.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/GenericDiscreteResources.java
index b8c8b2b..d35a477 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/GenericDiscreteResources.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/GenericDiscreteResources.java
@@ -68,7 +68,7 @@
 
     @Override
     public boolean containsAny(Set<DiscreteResource> other) {
-        return other.stream().anyMatch(values::contains);
+        return !Sets.intersection(this.values(), other).isEmpty();
     }
 
     // returns a new instance, not mutate the current instance