commit | 003ed3273e1c7965cbfec61cb9896ba8dbfff8a6 | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Thu Feb 11 12:58:42 2016 -0800 |
committer | Gerrit Code Review <gerrit@onlab.us> | Wed Feb 17 00:37:09 2016 +0000 |
tree | 8c93c26a68d6a69b42a6977c51ccd35f52255f15 | |
parent | 2703980ee4d448d8834b3b73fa2e030000f120f6 [diff] [blame] |
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.