Simplify the method chain

Change-Id: I658cf03d9bff8a798f0ae84bea04300de49f6714
diff --git a/core/api/src/main/java/org/onosproject/net/resource/ContinuousResourceId.java b/core/api/src/main/java/org/onosproject/net/resource/ContinuousResourceId.java
index 46237e0..1be2f01 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/ContinuousResourceId.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/ContinuousResourceId.java
@@ -63,9 +63,7 @@
         String typeName = (String) lastComponent();
         boolean foundInLeaf = typeName.equals(ancestor.getCanonicalName());
         boolean foundInAncestor = components.subList(0, components.size()).stream()
-                .filter(x -> ancestor.isAssignableFrom(x.getClass()))
-                .findAny()
-                .isPresent();
+                .anyMatch(x -> ancestor.isAssignableFrom(x.getClass()));
         return foundInAncestor || foundInLeaf;
     }