Package io.servicetalk.context.api
Class ContextMap.Key<T>
java.lang.Object
io.servicetalk.context.api.ContextMap.Key<T>
- Type Parameters:
T- The type of value associated with aContextMap.Key.
- Enclosing interface:
- ContextMap
A key identifies a specific object in a
ContextMap.
Comparison between ContextMap.Key objects should be assumed to be on an instance basis.
In general, newKey(strA, typeA) != newKey(strA, typeA).
-
Method Summary
-
Method Details
-
name
Returns the name of the key.- Returns:
- the name of the key.
-
type
Returns the type of the key.- Returns:
- the type of the key.
-
newKey
Creates a newContextMap.Keywith the specified name and type.- Type Parameters:
T- The value type associated with theContextMap.Key.- Parameters:
name- The name of the key. This WILL NOT be used in comparisons betweenContextMap.Keyobjects.type- The type of the key. This WILL NOT be used in comparisons betweenContextMap.Keyobjects.- Returns:
- A new
ContextMap.Keywhich uses a passed name only in thetoString()method for debugging visibility.
-
toString
-