Make resource retrieval more efficient when specifing resource type

This resolves ONOS-4666

Change-Id: I9d09b60531ca48b36fc20f43498cda62f1badb8b
diff --git a/core/api/src/main/java/org/onosproject/net/resource/ResourceStore.java b/core/api/src/main/java/org/onosproject/net/resource/ResourceStore.java
index b531d04..8456106 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/ResourceStore.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/ResourceStore.java
@@ -111,6 +111,18 @@
     Set<Resource> getChildResources(DiscreteResourceId parent);
 
     /**
+     * Returns a set of the child resources of the specified parent and whose type is
+     * the specified class.
+     *
+     * @param parent ID of the parent of the resources to be returned
+     * @param cls class instance of the children
+     * @param <T> type of the resource
+     * @return a set of the child resources of the specified parent and whose type is
+     * the specified class
+     */
+    <T> Set<Resource> getChildResources(DiscreteResourceId parent, Class<T> cls);
+
+    /**
      * Returns a collection of the resources which are children of the specified parent and
      * whose type is the specified class.
      *