Add a method to check the type of resource

Change-Id: If4b44688c0a93a43dfa9a4c2cb77c52599159751
diff --git a/core/api/src/main/java/org/onosproject/net/newresource/Resource.java b/core/api/src/main/java/org/onosproject/net/newresource/Resource.java
index 1e3e61a..f2a0c73 100644
--- a/core/api/src/main/java/org/onosproject/net/newresource/Resource.java
+++ b/core/api/src/main/java/org/onosproject/net/newresource/Resource.java
@@ -48,6 +48,14 @@
     ResourceId id();
 
     /**
+     * Checks if the type of this instance is the specified type.
+     *
+     * @param type type of resource to be checked
+     * @return true if this resource is the type of the specified type. Otherwise, false.
+     */
+    boolean isTypeOf(Class<?> type);
+
+    /**
      * Checks if the type of this instance is the sub-type of the specified type.
      *
      * @param ancestor type of resource to be checked.