RegistryEntrySet

sealed interface RegistryEntrySet<out T : Keyed> : Provider<Set<T>>

A set of RegistryEntries. RegistryEntrySets can be either:

Two RegistryEntrySets are considered equal (==) if they are of the same type (e.g. Nova.Direct, Paper.Tag), reference the same registries, and have the same content. Direct and tag sets are never equal, even if they resolve to the same entries.

See also

Inheritors

Types

Link copied to clipboard
sealed interface Nova<out T : NovaRegistryElement<T>> : RegistryEntrySet<T>

A RegistryEntrySet backed by a Nova registry.

Link copied to clipboard
sealed interface Paper<out T : Keyed> : RegistryEntrySet<T>

A RegistryEntrySet backed by a Paper registry.

Properties

Link copied to clipboard
abstract val children: Set<Provider<*>>
Link copied to clipboard
open val delegate: Provider<Set<T>>
Link copied to clipboard
abstract val isStable: Boolean
Link copied to clipboard
abstract val parents: Set<Provider<*>>
Link copied to clipboard
abstract val value: DeferredValue<Set<T>>

Functions

Link copied to clipboard
abstract fun addStrongChild(child: Provider<*>)
Link copied to clipboard
abstract fun addWeakChild(child: Provider<*>)
Link copied to clipboard
fun <T, R> Provider<T>.bootstrapFlatMap(transform: (T) -> Provider<R>): Provider<R>

Flat-maps the value of this provider via transform. During bootstrap phase, uses Provider.flatMap, otherwise Provider.immediateFlatMap. This allows creating flat-mapped providers based off of RegistryEntries lazily during bootstrap phase, where resolving their value is not possible, without paying for the extra overhead post-bootstrap, where immediateFlatMap can be used.

Link copied to clipboard
fun <T> Provider<Provider<T>>.bootstrapFlatten(): Provider<T>

Flattens the value of this provider. During bootstrap phase, uses Provider.flatMap, otherwise Provider.immediateFlatMap. This allows creating flat-mapped providers based off of RegistryEntries lazily during bootstrap phase, where resolving their value is not possible, without paying for the extra overhead post-bootstrap, where immediateFlatMap can be used.

Link copied to clipboard
open operator fun contains(value: T): Boolean

Checks whether value is part of this set. Requires resolving this set and as such this function may not be called before registry freeze.

Link copied to clipboard
abstract fun <R> flatMap(transform: (Set<T>) -> Provider<R>): Provider<R>
Link copied to clipboard
open override fun get(): Set<T>
Link copied to clipboard
open operator fun <X> getValue(thisRef: X?, property: KProperty<*>?): Set<T>
Link copied to clipboard
abstract fun handleParentUpdated(updatedParent: Provider<*>)
Link copied to clipboard
abstract fun <R> immediateFlatMap(transform: (Set<T>) -> Provider<R>): Provider<R>
Link copied to clipboard
abstract fun <R> immediateFlatMapMutable(transform: (Set<T>) -> MutableProvider<R>): MutableProvider<R>
Link copied to clipboard
abstract fun <R> map(transform: (Set<T>) -> R): Provider<R>
Link copied to clipboard
abstract fun observe(action: () -> Unit)
Link copied to clipboard
abstract fun <R : Any> observeWeak(owner: R, action: (owner: R) -> Unit)
Link copied to clipboard
abstract fun removeStrongChild(child: Provider<*>)
Link copied to clipboard
abstract fun removeWeakChild(child: Provider<*>)
Link copied to clipboard
abstract fun <R> strongFlatMap(transform: (Set<T>) -> Provider<R>): Provider<R>
Link copied to clipboard
abstract fun <R> strongImmediateFlatMap(transform: (Set<T>) -> Provider<R>): Provider<R>
Link copied to clipboard
abstract fun <R> strongImmediateFlatMapMutable(transform: (Set<T>) -> MutableProvider<R>): MutableProvider<R>
Link copied to clipboard
abstract fun <R> strongMap(transform: (Set<T>) -> R): Provider<R>
Link copied to clipboard
abstract fun subscribe(action: (value: Set<T>) -> Unit)
Link copied to clipboard
abstract fun <R : Any> subscribeWeak(owner: R, action: (owner: R, value: Set<T>) -> Unit)
Link copied to clipboard
abstract fun unobserve(action: () -> Unit)
Link copied to clipboard
abstract fun <R : Any> unobserveWeak(owner: R)
abstract fun <R : Any> unobserveWeak(owner: R, action: (R) -> Unit)
Link copied to clipboard
abstract fun unsubscribe(action: (Set<T>) -> Unit)
Link copied to clipboard
abstract fun <R : Any> unsubscribeWeak(owner: R)
abstract fun <R : Any> unsubscribeWeak(owner: R, action: (R, Set<T>) -> Unit)