ONOS-2294: Redefine LinkResource as interface
LinkResource was defined as an abstract class, but it doesn't define any methods. Maker interface fits this case. Note: This change may break backward compatibility for those defining a sub-class of LinkResource. Change-Id: I53cb7e8eae7057d07c63960c488979a99cd54d52
Showing
4 changed files
with
4 additions
and
5 deletions
... | @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; | ... | @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; |
24 | /** | 24 | /** |
25 | * Representation of bandwidth resource in bps. | 25 | * Representation of bandwidth resource in bps. |
26 | */ | 26 | */ |
27 | -public final class BandwidthResource extends LinkResource { | 27 | +public final class BandwidthResource implements LinkResource { |
28 | 28 | ||
29 | private final Bandwidth bandwidth; | 29 | private final Bandwidth bandwidth; |
30 | 30 | ... | ... |
... | @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; | ... | @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; |
24 | /** | 24 | /** |
25 | * Representation of lambda resource. | 25 | * Representation of lambda resource. |
26 | */ | 26 | */ |
27 | -public final class LambdaResource extends LinkResource { | 27 | +public final class LambdaResource implements LinkResource { |
28 | 28 | ||
29 | private final IndexedLambda lambda; | 29 | private final IndexedLambda lambda; |
30 | 30 | ... | ... |
... | @@ -18,6 +18,5 @@ package org.onosproject.net.resource.link; | ... | @@ -18,6 +18,5 @@ package org.onosproject.net.resource.link; |
18 | /** | 18 | /** |
19 | * Abstraction of link resource. | 19 | * Abstraction of link resource. |
20 | */ | 20 | */ |
21 | -public abstract class LinkResource { | 21 | +public interface LinkResource { |
22 | - | ||
23 | } | 22 | } | ... | ... |
... | @@ -21,7 +21,7 @@ import java.util.Objects; | ... | @@ -21,7 +21,7 @@ import java.util.Objects; |
21 | /** | 21 | /** |
22 | * Representation of MPLS label resource. | 22 | * Representation of MPLS label resource. |
23 | */ | 23 | */ |
24 | -public final class MplsLabel extends LinkResource { | 24 | +public final class MplsLabel implements LinkResource { |
25 | 25 | ||
26 | private final org.onlab.packet.MplsLabel mplsLabel; | 26 | private final org.onlab.packet.MplsLabel mplsLabel; |
27 | 27 | ... | ... |
-
Please register or login to post a comment