commit | caa2f7b9108884ec80c99b7feb5c8ffaba300a58 | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Fri Feb 12 17:38:49 2016 -0800 |
committer | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Wed Feb 17 20:31:04 2016 -0800 |
tree | 199726cdf2a940de2c0d62cdfd46d1a889056506 | |
parent | e5930cc85f167877383d02e8a61d7c2bfd7e9512 [diff] [blame] |
Refactor Resoruce/ResourceId sub-types isTypeOf() and isSubTypeOf() of Resource is delegated to ResourceId Change-Id: Ief39f4967b8fb43ec0cb35dbd44bd2a7dde93680
diff --git a/core/api/src/main/java/org/onosproject/net/newresource/ResourceId.java b/core/api/src/main/java/org/onosproject/net/newresource/ResourceId.java index 002dc87..c4df116 100644 --- a/core/api/src/main/java/org/onosproject/net/newresource/ResourceId.java +++ b/core/api/src/main/java/org/onosproject/net/newresource/ResourceId.java
@@ -31,6 +31,12 @@ abstract String simpleTypeName(); + // caller must pass a non-null value + abstract boolean isTypeOf(Class<?> type); + + // caller must pass a non-null value + abstract boolean isSubTypeOf(Class<?> ancestor); + /** * Returns the parent resource ID of this instance. *