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 ContinuousResourceIdchild(java.lang.Class<?> child)Returns a resource ID of a child of this resource based on the specified object.DiscreteResourceIdchild(java.lang.Object child)Returns a resource ID of a child of this resource based on the specified object.booleanequals(java.lang.Object obj)inthashCode()java.util.Optional<DiscreteResourceId>parent()Returns the parent resource ID of this instance.java.lang.StringtoString()
-
-
-
Method Detail
-
child
public DiscreteResourceId child(java.lang.Object child)
Returns a resource ID of a child of this resource based on the specified object. If the given object is aClassinstance,IllegalArgumentExceptionis thrown. A child of a continuous-type resource is prohibited.UnsupportedOperationExceptionis always thrown.- Specified by:
childin classResourceId- Parameters:
child- the last component of the child- Returns:
- a child resource ID
-
child
public ContinuousResourceId child(java.lang.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.UnsupportedOperationExceptionis always thrown.- Specified by:
childin classResourceId- Parameters:
child- the last component of the child- Returns:
- a child resource ID
-
parent
public java.util.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.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-