ImmutableRegisteringMap

@ApiStatus.Experimental
@ApiStatus.AvailableSince(value = "5.0.0")
open class ImmutableRegisteringMap<K : Any, V : Any> : RegisteringMap<K, V>

An Immutable variant of an RegisteringMap.

Parameters

K

The key type in the map.

V

The value type in the map.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun containsKey(key: K): Boolean
Link copied to clipboard
Link copied to clipboard
operator fun get(key: K): V?
Link copied to clipboard
fun getRegistered(): ImmutableMap<K, V>

fun getRegistered(descriptor: K): Option<V>

Attempts to get the value with the given descriptor.

Link copied to clipboard
fun register(descriptor: K): Result<V>

Attempts to register the value with the given descriptor.

Link copied to clipboard
suspend fun tryRegisterAll(): ImmutableSet<V>

Attempts to register all still unregistered values.

Link copied to clipboard
suspend fun unregister(descriptor: K): Boolean

Attempts to register the value with the given descriptor.

Link copied to clipboard
suspend fun unregisterAll(): ImmutableSet<K>

Unregisters all registered values.

Properties

Link copied to clipboard
val entries: ImmutableSet<Map.Entry<K, V>>
Link copied to clipboard
val keys: ImmutableSet<K>

An ImmutableSet of the keys in this map.

Link copied to clipboard
val size: Int

The size of this map.

Link copied to clipboard
val values: ImmutableCollection<V>

An ImmutableCollection of the registered values.