Package org.onosproject.net.resource
Class DiscreteResourceId
- java.lang.Object
-
- org.onosproject.net.resource.ResourceId
-
- org.onosproject.net.resource.DiscreteResourceId
-
@Beta public final class DiscreteResourceId extends ResourceId
ResourceId forDiscreteResource.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContinuousResourceIdchild(Class<?> child)Returns a resource ID of a child of this resource based on the specified object.DiscreteResourceIdchild(Object child)Returns a resource ID of a child of this resource based on the specified object.booleanequals(Object obj)inthashCode()Optional<DiscreteResourceId>parent()Returns the parent resource ID of this instance.StringtoString()
-
-
-
Method Detail
-
child
public DiscreteResourceId child(Object child)
Description copied from class:ResourceIdReturns a resource ID of a child of this resource based on the specified object. If the given object is aClassinstance,IllegalArgumentExceptionis thrown.- Specified by:
childin classResourceId- Parameters:
child- the last component of the child- Returns:
- a child resource ID
-
child
public ContinuousResourceId child(Class<?> child)
Description copied from class:ResourceIdReturns a resource ID of a child of this resource based on the specified object.- Specified by:
childin classResourceId- Parameters:
child- the last component of the child- Returns:
- a child resource ID
-
parent
public Optional<DiscreteResourceId> parent()
Description copied from class:ResourceIdReturns the parent resource ID of this instance.- Specified by:
parentin classResourceId- Returns:
- the parent resource ID of this instance. If there is no parent, empty instance will be returned.
-
-