Package org.onosproject.net.resource
Class ContinuousResourceId
- java.lang.Object
-
- org.onosproject.net.resource.ResourceId
-
- org.onosproject.net.resource.ContinuousResourceId
-
@Beta public final class ContinuousResourceId extends ResourceId
ResourceId forContinuousResource
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContinuousResourceId
child(Class<?> child)
Returns a resource ID of a child of this resource based on the specified object.DiscreteResourceId
child(Object child)
Returns a resource ID of a child of this resource based on the specified object.boolean
equals(Object obj)
int
hashCode()
Optional<DiscreteResourceId>
parent()
Returns the parent resource ID of this instance.String
toString()
-
-
-
Method Detail
-
child
public DiscreteResourceId child(Object child)
Returns a resource ID of a child of this resource based on the specified object. If the given object is aClass
instance,IllegalArgumentException
is thrown. A child of a continuous-type resource is prohibited.UnsupportedOperationException
is always thrown.- Specified by:
child
in classResourceId
- Parameters:
child
- the last component of the child- Returns:
- a child resource ID
-
child
public ContinuousResourceId child(Class<?> child)
Returns a resource ID of a child of this resource based on the specified object. A child of a continuous-type resource is prohibited.UnsupportedOperationException
is always thrown.- Specified by:
child
in classResourceId
- Parameters:
child
- the last component of the child- Returns:
- a child resource ID
-
parent
public Optional<DiscreteResourceId> parent()
Description copied from class:ResourceId
Returns the parent resource ID of this instance.- Specified by:
parent
in classResourceId
- Returns:
- the parent resource ID of this instance. If there is no parent, empty instance will be returned.
-
-