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, Closure configureClosure){@inheritDoc}  | 
                        
T | 
                            getByName(String name){@inheritDoc}  | 
                        
TaskCollection<T> | 
                            matching(Spec<? super T> spec){@inheritDoc}  | 
                        
TaskCollection<T> | 
                            matching(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(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, remove, equals, hashCode, clear, contains, isEmpty, iterator, size, toArray, toArray, spliterator, addAll, containsAll, removeAll, retainAll, stream, removeIf, parallelStream, forEach | 
                        
{@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}