DistributionContainer

A DistributionContainer manages a set of Distribution objects.

Functions

Link copied to clipboard
abstract fun add(p: E): Boolean

abstract fun add(e: T): Boolean
Adds an object to the collection, if there is no existing object in the collection with the same name.
Link copied to clipboard
abstract fun addAll(p: Collection<out E>): Boolean

abstract fun addAll(c: Collection<out T>): Boolean
Adds any of the given objects to the collection that do not have the same name as any existing element.
Link copied to clipboard
abstract fun addAllLater(provider: Provider<out Iterable<T>>)
Adds elements to this collection, given a Provider of Iterable that will provide the elements when required.
Link copied to clipboard
abstract fun addLater(provider: Provider<out T>)
Adds an element to this collection, given a Provider that will provide the element when required.
Link copied to clipboard
abstract fun addRule(rule: Rule): Rule
abstract fun addRule(description: String, ruleAction: Closure): Rule
abstract fun addRule(description: String, ruleAction: Action<String>): Rule
Adds a rule to this collection.
Link copied to clipboard
abstract fun all(action: Closure)
Executes the given closure against all objects in this collection, and any objects subsequently added to this collection.
abstract fun all(action: Action<in T>)
Executes the given action against all objects in this collection, and any objects subsequently added to this collection.
Link copied to clipboard
abstract fun clear()
Link copied to clipboard
abstract fun configure(configureClosure: Closure): NamedDomainObjectContainer<T>
Allows the container to be configured, creating missing objects as they are referenced.
abstract fun configure(cl: Closure): T
Link copied to clipboard
abstract fun configureEach(action: Action<in T>)
Configures each element in this collection using the given action, as each element is required.
Link copied to clipboard
abstract fun contains(p: Any): Boolean
Link copied to clipboard
abstract fun containsAll(p: Collection<out Any>): Boolean
Link copied to clipboard
open fun <E> copyOf(coll: Collection<out E>): Set<E>
Link copied to clipboard
abstract fun create(name: String): T
Creates a new item with the given name, adding it to this container.
abstract fun create(name: String, configureClosure: Closure): T
Creates a new item with the given name, adding it to this container, then configuring it with the given closure.
abstract fun create(name: String, configureAction: Action<in T>): T
Creates a new item with the given name, adding it to this container, then configuring it with the given action.
Link copied to clipboard
Disallows further structural modifications to this collection.
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun findAll(spec: Closure): Collection<T>
abstract fun findAll(spec: Closure): Set<T>
Returns a collection which contains the objects in this collection which meet the given closure specification.
Link copied to clipboard
@Nullable
abstract fun findByName(name: String): @Nullable T
Locates an object by name, returning null if there is no such object.
Link copied to clipboard
open fun forEach(action: Consumer<in T>)
Link copied to clipboard
abstract fun getAsMap(): SortedMap<String, T>
Returns the objects in this collection, as a map from object name to object instance.
Link copied to clipboard
abstract fun getAt(name: String): T
Locates an object by name, failing if there is no such object.
Link copied to clipboard
abstract fun getByName(name: String): T
abstract fun getByName(name: String, configureClosure: Closure): T
abstract fun getByName(name: String, configureAction: Action<in T>): T
Locates an object by name, failing if there is no such object.
Link copied to clipboard
Provides access to the schema of all created or registered named domain objects in this collection.
Link copied to clipboard
abstract fun getNamer(): Namer<T>
An object that represents the naming strategy used to name objects of this collection.
Link copied to clipboard
abstract fun getNames(): SortedSet<String>
Returns the names of the objects in this collection as a Set of Strings.
Link copied to clipboard
abstract fun getRules(): List<Rule>
Returns the rules used by this collection.
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
abstract fun isEmpty(): Boolean
Link copied to clipboard
abstract fun iterator(): Iterator<T>
abstract fun iterator(): Iterator<E>
Link copied to clipboard
abstract fun matching(spec: Closure): DomainObjectCollection<T>
abstract fun matching(spec: Closure): DomainObjectSet<T>
abstract fun matching(spec: Closure): NamedDomainObjectCollection<T>
Returns a collection which contains the objects in this collection which meet the given closure specification.
abstract fun matching(spec: Spec<in T>): DomainObjectCollection<T>
abstract fun matching(spec: Spec<in T>): DomainObjectSet<T>
abstract fun matching(spec: Spec<in T>): NamedDomainObjectCollection<T>
Returns a collection which contains the objects in this collection which meet the given specification.
abstract fun matching(spec: Closure): NamedDomainObjectSet<T>
abstract fun matching(spec: Spec<in T>): NamedDomainObjectSet<T>
Link copied to clipboard
abstract fun maybeCreate(name: String): T
Looks for an item with the given name, creating and adding it to this container if it does not exist.
Link copied to clipboard
abstract fun named(name: String): NamedDomainObjectProvider<T>
abstract fun named(name: String, configurationAction: Action<in T>): NamedDomainObjectProvider<T>
Locates a object by name, failing if there is no such object.
abstract fun named(nameFilter: Spec<String>): NamedDomainObjectSet<T>
Returns a collection containing the objects with names matching the provided filter.
abstract fun <S : T?> named(name: String, type: Class<S>): NamedDomainObjectProvider<S>
abstract fun <S : T?> named(name: String, type: Class<S>, configurationAction: Action<in S>): NamedDomainObjectProvider<S>
Locates a object by name and type, failing if there is no such object.
Link copied to clipboard
open fun <E> of(): Set<E>
Link copied to clipboard
open fun parallelStream(): Stream<E>
Link copied to clipboard
Defines a new object, which will be created when it is required.
abstract fun register(name: String, configurationAction: Action<in T>): NamedDomainObjectProvider<T>
Defines a new object, which will be created and configured when it is required.
Link copied to clipboard
abstract fun remove(p: Any): Boolean
Link copied to clipboard
abstract fun removeAll(p: Collection<out Any>): Boolean
Link copied to clipboard
open fun removeIf(filter: Predicate<in E>): Boolean
Link copied to clipboard
abstract fun retainAll(p: Collection<out Any>): Boolean
Link copied to clipboard
abstract fun size(): Int
Link copied to clipboard
Link copied to clipboard
open fun stream(): Stream<E>
Link copied to clipboard
abstract fun toArray(): Array<Any>
abstract fun <T> toArray(p: Array<T>): Array<T>
Link copied to clipboard
abstract fun whenObjectAdded(action: Closure)
Adds a closure to be called when an object is added to this collection.
abstract fun whenObjectAdded(action: Action<in T>): Action<in T>
Adds an Action to be executed when an object is added to this collection.
Link copied to clipboard
abstract fun whenObjectRemoved(action: Closure)
Adds a closure to be called when an object is removed from this collection.
abstract fun whenObjectRemoved(action: Action<in T>): Action<in T>
Adds an Action to be executed when an object is removed from this collection.
Link copied to clipboard
abstract fun <S : T?> withType(type: Class<S>): DomainObjectCollection<S>
abstract fun <S : T?> withType(type: Class<S>, @DelegatesTo(genericTypeIndex = 0) configureClosure: Closure): DomainObjectCollection<S>
abstract fun <S : T?> withType(type: Class<S>, configureAction: Action<in S>): DomainObjectCollection<S>
abstract fun <S : T?> withType(type: Class<S>): DomainObjectSet<S>
abstract fun <S : T?> withType(type: Class<S>): NamedDomainObjectCollection<S>
Returns a collection containing the objects in this collection of the given type.
abstract fun <S : T?> withType(type: Class<S>): NamedDomainObjectSet<S>