Package io.servicetalk.concurrent.api
Class AsyncContextMap.Key<T>
- java.lang.Object
-
- io.servicetalk.concurrent.api.AsyncContextMap.Key<T>
-
- Type Parameters:
T
- The type of value associated with aAsyncContextMap.Key
.
- Enclosing interface:
- AsyncContextMap
public static final class AsyncContextMap.Key<T> extends java.lang.Object
A key identifies a specific object in aAsyncContextMap
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> AsyncContextMap.Key<T>
newKey()
Create a new instance.static <T> AsyncContextMap.Key<T>
newKey(java.lang.String toString)
Create a newAsyncContextMap.Key
which has aString
used only in thetoString()
method for debugging visibility.java.lang.String
toString()
-
-
-
Method Detail
-
newKey
public static <T> AsyncContextMap.Key<T> newKey(java.lang.String toString)
Create a newAsyncContextMap.Key
which has aString
used only in thetoString()
method for debugging visibility.Comparison between
AsyncContextMap.Key
objects should be assumed to be on an instance basis. In generalnewKey(str) != newKey(str)
.- Type Parameters:
T
- The value type associated with theAsyncContextMap.Key
.- Parameters:
toString
- The value to use intoString()
. This WILL NOT be used in comparisons betweenAsyncContextMap.Key
objects.- Returns:
- a new
AsyncContextMap.Key
which has aString
used only in thetoString()
method for debugging visibility.
-
newKey
public static <T> AsyncContextMap.Key<T> newKey()
Create a new instance.Comparison between
AsyncContextMap.Key
objects should be assumed to be on an instance basis. In generalnewKey() != newKey()
.- Type Parameters:
T
- The value type associated with theAsyncContextMap.Key
.- Returns:
- a new instance.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-