MutableProviderRegistryWrapper

A mutable wrapper that adapts a MutableProviderRegistry to a MutableOwnedProviderRegistry with a specific owner type.

Extends ProviderRegistryWrapper and MutableRegistryWrapper with MutableOwnedProviderRegistry capabilities, delegating all operations to the underlying MutableProviderRegistry.

Type Parameters

Owner

The type representing the owner or context of this mutable wrapper.

Properties

Link copied to clipboard
abstract override val registry: MutableProviderRegistry

The underlying MutableProviderRegistry that this wrapper delegates to.

Functions

Link copied to clipboard

Returns an iterable of all key-provider pairs in this registry.

Link copied to clipboard

Returns an iterable of all key-value pairs registered in this registry.

Link copied to clipboard
open operator override fun contains(registryKey: RegistryKey<*>): Boolean

Checks if the registryKey is stored in the registry and has an association with a value.

Link copied to clipboard
open operator override fun <T> get(registryKey: RegistryKey<out T>): T

Retrieves the value associated with the specified registryKey.

Link copied to clipboard
fun <T> Registry.getMaybe(registryKey: RegistryKey<T>): Maybe<T>

Retrieves value wrapped in Some by the specified registryKey or returns None if no association is present.

Link copied to clipboard
fun <T> Registry.getOrDefault(registryKey: RegistryKey<T>, default: T): T

Retrieves value by the specified registryKey or returns the default value if no association is present.

Link copied to clipboard
inline fun <T> Registry.getOrElse(registryKey: RegistryKey<out T>, block: () -> T): T

Retrieves value by the specified registryKey or computes the block and returns its value if no association is present.

Link copied to clipboard
fun <T> Registry.getOrNull(registryKey: RegistryKey<T>): T?

Retrieves value by the specified registryKey or returns null if no association is present.

Link copied to clipboard
open override fun <T> provide(registryKey: RegistryKey<out T>): RegisteredValueProvider<T>

Gets the provider associated with the specified registryKey.

Link copied to clipboard

Gets the provider associated with the specified registryKey, or returns null if no association is present.

Link copied to clipboard
open override fun remove(registryKey: RegistryKey<*>)

Removes the association for the specified registryKey from this registry.

Link copied to clipboard
open operator override fun <T> set(registryKey: RegistryKey<in T>, provider: RegisteredValueProvider<T>)

Associates the specified provider with the specified registryKey in this registry.

open operator override fun <T> set(registryKey: RegistryKey<in T>, value: T)

Associates the specified value with the specified registryKey in this registry.

Link copied to clipboard
operator fun <T> MutableProviderRegistry.set(registryImplication: ProviderRegistryImplication<T>, provider: RegisteredValueProvider<T>)

Sets all key-value pairs from a ProviderRegistryImplication into this provider registry.

operator fun <T> MutableRegistry.set(registryImplication: ProviderRegistryImplication<T>, value: T)

Sets all key-value pairs from a ProviderRegistryImplication into this registry.

Link copied to clipboard
open override fun setFrom(from: ProviderRegistry)

Copies all key-provider associations from the from provider registry into this registry.

open override fun setFrom(from: Registry)

Copies all associations from the from registry into this registry.