# ComponentSpecContainer

@Incubating
interface ComponentSpecContainer : ModelMap<ComponentSpec> (source)

A container of software components.

## Functions

afterEach
Link copied to clipboard
abstract fun afterEach(configAction: Action<in T>)
Applies the given action to each item in the collection, as each item is required.
abstract fun <S> afterEach(type: Class<S>, configAction: Action<in S>)
Applies the given action to each item of the given type in the collection, as each item is required.
all
Link copied to clipboard
abstract fun all(configAction: Action<in T>)
Applies the given action to each item in the collection, as each item is required.
beforeEach
Link copied to clipboard
abstract fun beforeEach(configAction: Action<in T>)
Applies the given action to each item in this collection, as each item is required.
abstract fun <S> beforeEach(type: Class<S>, configAction: Action<in S>)
Applies the given action to each item of the given type in this collection, as each item is required.
containsKey
Link copied to clipboard
abstract fun containsKey(name: Any): Boolean
Returns true if this collection contains an item with the given name.
containsValue
Link copied to clipboard
abstract fun containsValue(item: Any): Boolean
Returns true if this collection contains the given item.
create
Link copied to clipboard
abstract fun create(name: String)
abstract fun create(name: String, configAction: Action<in T>)
Defines an item with the given name and type T.
abstract fun <S : T?> create(name: String, type: Class<S>)
abstract fun <S : T?> create(name: String, type: Class<S>, configAction: Action<in S>)
Defines an item with the given name and type.
forEach
Link copied to clipboard
open fun forEach(action: Consumer<in T>)
get
Link copied to clipboard
@Nullable
abstract fun get(name: Any): @Nullable T
@Nullable
abstract fun get(name: String): @Nullable T
Returns the item with the given name, if any.
getDisplayName
Link copied to clipboard
abstract fun getDisplayName(): String
Returns a human-consumable display name for this element.
getName
Link copied to clipboard
abstract fun getName(): String
Returns the name of this element.
isEmpty
Link copied to clipboard
abstract fun isEmpty(): Boolean
Returns true if this collection contains no items.
iterator
Link copied to clipboard
abstract fun iterator(): Iterator<T>
keySet
Link copied to clipboard
abstract fun keySet(): Set<String>
Returns the names of the items in this collection.
named
Link copied to clipboard
abstract fun named(name: String, ruleSource: Class<out RuleSource>)
Applies the given rule source class to the given item, when the item is required.
abstract fun named(name: String, configAction: Action<in T>)
Applies the given action to the given item, when the item is required.
put
Link copied to clipboard
abstract fun put(name: String, instance: T)
Adds an element to this `ModelMap`.
size
Link copied to clipboard
abstract fun size(): Int
Returns the number of items in this collection.
spliterator
Link copied to clipboard
open fun spliterator(): Spliterator<T>
values
Link copied to clipboard
abstract fun values(): Collection<T>
Returns the items in this collection.
withType
Link copied to clipboard
abstract fun <S> withType(type: Class<S>): ModelMap<S>
Returns a collection containing the items from this collection which are of the specified type.
abstract fun <S> withType(type: Class<S>, rules: Class<out RuleSource>)
Applies the given rules to all items of the collection of the given type.
abstract fun <S> withType(type: Class<S>, configAction: Action<in S>)
Applies the given action to each item of the given type in the collection, as each item is required.