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 Identifier<java.lang.Long> implements ResourceConsumer
Intent identifier suitable as an external key.This class is immutable.
-
-
Field Summary
-
Fields inherited from class org.onlab.util.Identifier
identifier
-
-
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)Compares two device key identifiers for equality.longfingerprint()Returns the backing value.inthashCode()Returns the hashcode of the identifier.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()Returns a string representation of a DeviceKeyId.-
Methods inherited from class org.onlab.util.Identifier
id
-
-
-
-
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()
Description copied from class:IdentifierReturns a string representation of a DeviceKeyId.- Overrides:
toStringin classIdentifier<java.lang.Long>- Returns:
- string
-
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()
Description copied from class:IdentifierReturns the hashcode of the identifier.- Overrides:
hashCodein classIdentifier<java.lang.Long>- Returns:
- hashcode
-
equals
public boolean equals(java.lang.Object obj)
Description copied from class:IdentifierCompares two device key identifiers for equality.- Overrides:
equalsin classIdentifier<java.lang.Long>- Parameters:
obj- to compare against- Returns:
- true if the objects are equal, false otherwise.
-
-