Package org.onosproject.net
Class ResourceGroup
- java.lang.Object
-
- org.onlab.util.Identifier<java.lang.Long>
-
- org.onosproject.net.ResourceGroup
-
- All Implemented Interfaces:
ResourceConsumer
@Beta public final class ResourceGroup extends org.onlab.util.Identifier<java.lang.Long> implements ResourceConsumer
Intent identifier suitable as an external key.This class is immutable.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedResourceGroup()Constructor for serializer.protectedResourceGroup(long value)Constructs the ID corresponding to a given long value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceConsumerIdconsumerId()Returns ID of this consumer.booleanequals(java.lang.Object obj)longfingerprint()Returns the backing value.inthashCode()static ResourceGroupof(long value)Creates a resource group identifier from the specified long representation.static ResourceGroupof(java.lang.String value)Creates a resource group identifier from the specified string representation.java.lang.StringtoString()
-
-
-
Method Detail
-
of
public static ResourceGroup of(long value)
Creates a resource group identifier from the specified long representation.- Parameters:
value- long value- Returns:
- resource group identifier
-
of
public static ResourceGroup of(java.lang.String value)
Creates a resource group identifier from the specified string representation. Warning: it is caller responsibility to make sure the hashed value ofvalueis unique.- Parameters:
value- string value- Returns:
- resource group identifier
-
fingerprint
public long fingerprint()
Returns the backing value.- Returns:
- the value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classorg.onlab.util.Identifier<java.lang.Long>
-
consumerId
public ResourceConsumerId consumerId()
Description copied from interface:ResourceConsumerReturns ID of this consumer.- Specified by:
consumerIdin interfaceResourceConsumer- Returns:
- ID of this consumer
-
hashCode
public int hashCode()
- Overrides:
hashCodein classorg.onlab.util.Identifier<java.lang.Long>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classorg.onlab.util.Identifier<java.lang.Long>
-
-