Paper

sealed interface Paper<out T : Keyed> : RegistryEntrySet<T>

A RegistryEntrySet backed by a Paper registry.

Inheritors

Types

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

A RegistryEntrySet.Paper backed by a constant set of entries.

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

A RegistryEntrySet.Paper backed by a tag.

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 registry: RegistryKey<T>

The key of the registry this RegistryEntrySet.Paper belongs to.

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.

abstract operator fun contains(entry: RegistryEntry.Paper<T>?): Boolean

Checks whether entry is part of this set. Depending on whether this is a Direct or Tag set, this may involve 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 toRegistryKeySet(registryAccess: RegistryAccess = RegistryAccess.registryAccess()): RegistryKeySet<T>

Converts this entry set to a RegistrySet. This may involve accessing the underlying registry via registryAccess. As such, this function may not be called before registry freeze.

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)