T
- The type of tasks which this collection contains.public interface TaskCollection<T extends Task> extends NamedDomainObjectSet<T>
TaskCollection
contains a set of Task
instances, and provides a number of query methods.修飾子とタイプ | メソッドと説明 |
---|---|
T |
getAt(String name)
Locates an object by name, failing if there is no such task.
|
T |
getByName(String name)
Locates an object by name, failing if there is no such object.
|
T |
getByName(String name,
Closure configureClosure)
Locates an object by name, failing if there is no such object.
|
TaskCollection<T> |
matching(Closure closure)
Returns a collection which contains the objects in this collection which meet the given closure specification.
|
TaskCollection<T> |
matching(Spec<? super T> spec)
Returns a collection which contains the objects in this collection which meet the given specification.
|
Action<? super T> |
whenTaskAdded(Action<? super T> action)
Adds an
Action to be executed when a task is added to this collection. |
void |
whenTaskAdded(Closure closure)
Adds a closure to be called when a task is added to this collection.
|
<S extends T> |
withType(Class<S> type)
Returns a collection containing the objects in this collection of the given type.
|
findAll
add, addAll, addRule, addRule, findByName, getAsMap, getNamer, getNames, getRules
all, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType
clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
TaskCollection<T> matching(Spec<? super T> spec)
matching
インタフェース内 DomainObjectCollection<T extends Task>
matching
インタフェース内 NamedDomainObjectCollection<T extends Task>
matching
インタフェース内 NamedDomainObjectSet<T extends Task>
spec
- The specification to use.TaskCollection<T> matching(Closure closure)
matching
インタフェース内 DomainObjectCollection<T extends Task>
matching
インタフェース内 NamedDomainObjectCollection<T extends Task>
matching
インタフェース内 NamedDomainObjectSet<T extends Task>
closure
- The specification to use. The closure gets a collection element as an argument.T getByName(String name, Closure configureClosure) throws UnknownTaskException
getByName
インタフェース内 NamedDomainObjectCollection<T extends Task>
name
- The object nameconfigureClosure
- The closure to use to configure the object.UnknownTaskException
T getByName(String name) throws UnknownTaskException
getByName
インタフェース内 NamedDomainObjectCollection<T extends Task>
name
- The object nameUnknownTaskException
<S extends T> TaskCollection<S> withType(Class<S> type)
withType
インタフェース内 DomainObjectCollection<T extends Task>
withType
インタフェース内 NamedDomainObjectCollection<T extends Task>
withType
インタフェース内 NamedDomainObjectSet<T extends Task>
type
- The type of objects to find.Action<? super T> whenTaskAdded(Action<? super T> action)
Action
to be executed when a task is added to this collection.action
- The action to be executedvoid whenTaskAdded(Closure closure)
closure
- The closure to be calledT getAt(String name) throws UnknownTaskException
NamedDomainObjectCollection.getByName(String)
. You can call this method in your build script by using the groovy []
operator.getAt
インタフェース内 NamedDomainObjectCollection<T extends Task>
name
- The object nameUnknownTaskException