subkt / myaa.subkt.tasks / ItemGroup
abstract class ItemGroup<T>
(source)
A group of items of type T. Has convenience functions for getting all items belonging to the same entry as a certain task, or all items corresponding to a specified list of entries.
Name | Summary |
---|---|
<init> | ItemGroup(subs: Subs ) A group of items of type T. Has convenience functions for getting all items belonging to the same entry as a certain task, or all items corresponding to a specified list of entries. |
Name | Summary |
---|---|
subs | val subs: Subs The Subs instance this ItemGroup is associated with. |
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. |
createItem | abstract fun createItem(entry: String , isBatch: Boolean , episodes: List < String >): T Returns a new item of type T. |
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. |
Name | Summary |
---|---|
ProviderGroup | class ProviderGroup<T> : ItemGroup < Provider < 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. |
TaskGroup | class TaskGroup<T : Task > : ItemGroup < TaskProvider < T >> A group of tasks of the same type. |
ValueGroup | class ValueGroup<T> : ItemGroup < T > ItemGroup that keeps track of simple values of type T. The closure is evaluated immediately for each entry. |