Package org.onosproject.net.intent
Class Key
- java.lang.Object
- 
- org.onosproject.net.intent.Key
 
- 
- All Implemented Interfaces:
- java.lang.Comparable<Key>,- ResourceConsumer
 
 @Beta public abstract class Key extends java.lang.Object implements java.lang.Comparable<Key>, ResourceConsumer Key class for Intents.
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedKey(long hash)
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ResourceConsumerIdconsumerId()Returns ID of this consumer.abstract booleanequals(java.lang.Object obj)longhash()inthashCode()static Keyof(long key, ApplicationId appId)Creates a key based on the provided long.static Keyof(java.lang.String key, ApplicationId appId)Creates a key based on the provided string.
 
- 
- 
- 
Method Detail- 
hashpublic long hash() 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic abstract boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
ofpublic static Key of(java.lang.String key, ApplicationId appId) Creates a key based on the provided string.Note: Two keys with equal value, but different appId, are not equal. Warning: it is caller responsibility to make sure the hashed value of valueis unique.- Parameters:
- key- the provided string
- appId- application id to associate with this key
- Returns:
- the key for the string
 
 - 
ofpublic static Key of(long key, ApplicationId appId) Creates a key based on the provided long.Note: Two keys with equal value, but different appId, are not equal. Also, "10" and 10L are different. - Parameters:
- key- the provided long
- appId- application id to associate with this key
- Returns:
- the key for the long
 
 - 
consumerIdpublic ResourceConsumerId consumerId() Description copied from interface:ResourceConsumerReturns ID of this consumer.- Specified by:
- consumerIdin interface- ResourceConsumer
- Returns:
- ID of this consumer
 
 
- 
 
-