Attributes

interface Attributes

Immutable type safe property bag

Inheritors

Properties

Link copied to clipboard
abstract val isEmpty: Boolean

Flag indicating if attributes is empty

Link copied to clipboard
abstract val keys: Set<AttributeKey<*>>

Get a set of all the keys

Inherited properties

Link copied to clipboard

Flag indicating if attributes is not empty

Functions

Link copied to clipboard
abstract operator fun contains(key: AttributeKey<*>): Boolean

Check if an attribute with the specified key exists

Link copied to clipboard
abstract fun <T : Any> getOrNull(key: AttributeKey<T>): T?

Get a value of the attribute for the specified key or null

Inherited functions

Link copied to clipboard
operator fun <T : Any> Attributes.get(key: AttributeKey<T>): T

Gets a value of the attribute for the specified key or throws an IllegalStateException if key does not exist

Link copied to clipboard

Returns a new MutableAttributes instance with elements from this set of attributes.