public Attributes
Map of attributes accessible by class AttributeKey in a typed manner
class AttributeKey| Modifier and Type | Interface and Description |
|---|---|
static class |
Attributes.DefaultImpls
Map of attributes accessible by
class AttributeKey in a typed manner |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
computeIfAbsent(AttributeKey<T> key,
kotlin.jvm.functions.Function0<? extends T> block)
Gets a value of the attribute for the specified key, or calls supplied block to compute its value
|
boolean |
contains(AttributeKey<?> key)
Checks if an attribute with the specified key exists
|
<T> T |
get(AttributeKey<T> key)
Gets a value of the attribute for the specified key, or throws an exception if an attribute doesn't exist
|
java.util.List<io.ktor.util.AttributeKey> |
getAllKeys()
Returns List of all
class AttributeKey instances in this map |
<T> T |
getOrNull(AttributeKey<T> key)
Gets a value of the attribute for the specified key, or return
null if an attribute doesn't exist |
<T> void |
put(AttributeKey<T> key,
T value)
Creates or changes an attribute with the specified key using value
|
<T> void |
remove(AttributeKey<T> key)
Removes an attribute with the specified key
|
<T> T |
take(AttributeKey<T> key)
Removes an attribute with the specified key and returns its current value, throws an exception if an attribute doesn't exist
|
<T> T |
takeOrNull(AttributeKey<T> key)
Removes an attribute with the specified key and returns its current value, returns
null if an attribute doesn't exist |
<T> T get(AttributeKey<T> key)
Gets a value of the attribute for the specified key, or throws an exception if an attribute doesn't exist
<T> T getOrNull(AttributeKey<T> key)
Gets a value of the attribute for the specified key, or return null if an attribute doesn't exist
boolean contains(AttributeKey<?> key)
Checks if an attribute with the specified key exists
<T> void put(AttributeKey<T> key, T value)
Creates or changes an attribute with the specified key using value
<T> void remove(AttributeKey<T> key)
Removes an attribute with the specified key
<T> T take(AttributeKey<T> key)
Removes an attribute with the specified key and returns its current value, throws an exception if an attribute doesn't exist
<T> T takeOrNull(AttributeKey<T> key)
Removes an attribute with the specified key and returns its current value, returns null if an attribute doesn't exist
<T> T computeIfAbsent(AttributeKey<T> key, kotlin.jvm.functions.Function0<? extends T> block)
Gets a value of the attribute for the specified key, or calls supplied block to compute its value
java.util.List<io.ktor.util.AttributeKey> getAllKeys()
Returns List of all class AttributeKey instances in this map
class AttributeKey