Package org.onosproject.net.intent
Class IntentId
- java.lang.Object
-
- org.onlab.util.Identifier<Long>
-
- org.onosproject.net.intent.IntentId
-
- All Implemented Interfaces:
ResourceConsumer
@Beta public final class IntentId extends Identifier<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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceConsumerIdconsumerId()Returns ID of this consumer.longfingerprint()Returns the backing value.StringtoString()Returns a string representation of a DeviceKeyId.static IntentIdvalueOf(long value)Creates an intent identifier from the specified long representation.static IntentIdvalueOf(String id)Creates an intent identifier from the specified String representation.-
Methods inherited from class org.onlab.util.Identifier
equals, hashCode, id
-
-
-
-
Method Detail
-
valueOf
public static IntentId valueOf(long value)
Creates an intent identifier from the specified long representation.- Parameters:
value- long value- Returns:
- intent identifier
-
valueOf
public static IntentId valueOf(String id)
Creates an intent identifier from the specified String representation.- Parameters:
id- hexadecimal String prefixed with 0x- Returns:
- intent identifier
-
fingerprint
public long fingerprint()
Returns the backing value.- Returns:
- the value
-
toString
public String toString()
Description copied from class:IdentifierReturns a string representation of a DeviceKeyId.- Overrides:
toStringin classIdentifier<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
-
-