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.Key
with 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.Key
objects.type
- The type of the key. This WILL NOT be used in comparisons betweenContextMap.Key
objects.- Returns:
- A new
ContextMap.Key
which uses a passed name only in thetoString()
method for debugging visibility.
-
toString
-