Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 4.39 KB

File metadata and controls

41 lines (28 loc) · 4.39 KB

subkt / myaa.subkt.tasks / ProviderGroup

ProviderGroup

class ProviderGroup<T> : ItemGroup<Provider<T>> (source)

ItemGroup that keeps track of providers for values of type T. A Provider is generated for each entry, and the given closure is evaluated when the provider's value is requested.

Constructors

Name Summary
<init> ProviderGroup(subs: Subs, action: ValueClosure<*>.() -> T)
ItemGroup that keeps track of providers for values of type T. A Provider is generated for each entry, and the given closure is evaluated when the provider's value is requested.

Properties

Name Summary
action val action: ValueClosure<*>.() -> T

Inherited Properties

Name Summary
subs val subs: Subs
The Subs instance this ItemGroup is associated with.

Functions

Name Summary
createItem fun createItem(entry: String, isBatch: Boolean, episodes: List<String>): Provider<T>
Returns a new item of type T.

Inherited Functions

Name Summary
batchItems fun batchItems(entries: Iterable<String>): List<T>
fun batchItems(entries: Provider<out Iterable<String>>): List<T>
Get all items corresponding to the specified entries.fun batchItems(task: Task): List<T>
Get all items corresponding to the episodes of the given task.
item fun item(entry: String): T
Get the item corresponding to the specified entry.fun item(task: Task): T
Get the item of the same the entry as the given task.
registerItemMaybe fun registerItemMaybe(entry: String, isBatch: Boolean, episodes: List<String>): T
Register a new item or return the item if it already exists.