subkt / myaa.subkt.tasks / 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.
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. |
Name | Summary |
---|---|
action | val action: ValueClosure <*>.() -> T |
Name | Summary |
---|---|
subs | val subs: Subs The Subs instance this ItemGroup is associated with. |
Name | Summary |
---|---|
createItem | fun createItem(entry: String , isBatch: Boolean , episodes: List < String >): Provider < T > Returns a new item of type T. |
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. |