Add a method to get resource type name: simpleTypeName()
last() is removed as the new method takes over its role
Change-Id: Id3737529787da5d5bb513355cdbc443f2b7b17e2
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 5572592..1548717 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,17 @@
ResourceId id();
/**
+ * Returns the simple type name of this resource.
+ *
+ * Example:<br>
+ * Resource: DeviceId:1/PortNumber:1/VlanId:200<br>
+ * Simple type name: VlanId<br>
+ *
+ * @return the simple type name of this resource
+ */
+ String simpleTypeName();
+
+ /**
* Checks if the type of this instance is the specified type.
*
* @param type type of resource to be checked
@@ -75,14 +86,6 @@
<T> Optional<T> valueAs(Class<T> type);
/**
- * Returns the last component of this instance.
- *
- * @return the last component of this instance.
- * The return value is equal to the last object of {@code components()}.
- */
- Object last();
-
- /**
* Returns the parent resource of this instance.
* E.g. if this resource is Link:1/VLAN ID:100, the return value is the resource for Link:1.
*