Sho SHIMIZU
Committed by Gerrit Code Review

Pull up components() method as an abstract method

Change-Id: I80aecb74958b697fb18336bbe39853dd5cb67578
...@@ -45,6 +45,7 @@ public final class ContinuousResourceId extends ResourceId { ...@@ -45,6 +45,7 @@ public final class ContinuousResourceId extends ResourceId {
45 this.name = ""; 45 this.name = "";
46 } 46 }
47 47
48 + @Override
48 ImmutableList<Object> components() { 49 ImmutableList<Object> components() {
49 return components; 50 return components;
50 } 51 }
......
...@@ -42,6 +42,7 @@ public final class DiscreteResourceId extends ResourceId { ...@@ -42,6 +42,7 @@ public final class DiscreteResourceId extends ResourceId {
42 this.components = ImmutableList.of(); 42 this.components = ImmutableList.of();
43 } 43 }
44 44
45 + @Override
45 ImmutableList<Object> components() { 46 ImmutableList<Object> components() {
46 return components; 47 return components;
47 } 48 }
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
16 package org.onosproject.net.newresource; 16 package org.onosproject.net.newresource;
17 17
18 import com.google.common.annotations.Beta; 18 import com.google.common.annotations.Beta;
19 +import com.google.common.collect.ImmutableList;
19 20
20 import java.util.Optional; 21 import java.util.Optional;
21 22
...@@ -27,6 +28,8 @@ import java.util.Optional; ...@@ -27,6 +28,8 @@ import java.util.Optional;
27 public abstract class ResourceId { 28 public abstract class ResourceId {
28 static final DiscreteResourceId ROOT = new DiscreteResourceId(); 29 static final DiscreteResourceId ROOT = new DiscreteResourceId();
29 30
31 + abstract ImmutableList<Object> components();
32 +
30 /** 33 /**
31 * Returns the parent resource ID of this instance. 34 * Returns the parent resource ID of this instance.
32 * 35 *
......