A TaskCollection contains a set of Task instances, and provides a number of query methods.
- The type of tasks which this collection contains.| Type | Name and description |
|---|---|
T |
getAt(String name){@inheritDoc} |
T |
getByName(String name, groovy.lang.Closure configureClosure){@inheritDoc} |
T |
getByName(String name){@inheritDoc} |
TaskCollection<T> |
matching(Spec<? super T> spec){@inheritDoc} |
TaskCollection<T> |
matching(groovy.lang.Closure closure){@inheritDoc} |
Action<? super T> |
whenTaskAdded(Action<? super T> action)Adds an Action to be executed when a task is added to this collection. |
void |
whenTaskAdded(groovy.lang.Closure closure)Adds a closure to be called when a task is added to this collection. |
TaskCollection<S> |
withType(Class<S> type){@inheritDoc} |
| Methods inherited from class | Name |
|---|---|
interface NamedDomainObjectSet |
findAll, matching, matching, withType |
interface NamedDomainObjectCollection |
add, addAll, addRule, addRule, findByName, getAsMap, getAt, getByName, getByName, getNamer, getNames, getRules, matching, matching, withType |
interface Set |
add, equals, hashCode, clear, contains, isEmpty, size, toArray, toArray, addAll, iterator, remove, containsAll, removeAll, retainAll |
{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
Adds an Action to be executed when a task is added to this collection.
action - The action to be executedAdds a closure to be called when a task is added to this collection. The task is passed to the closure as the parameter.
closure - The closure to be called{@inheritDoc}