public class DefaultTaskCollection<T extends Task> extends DefaultNamedDomainObjectSet<T> implements TaskCollection<T>
| Modifier and Type | Field and Description |
|---|---|
protected ProjectInternal |
project |
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultTaskCollection(Class<? extends T> type,
Set<T> store,
CollectionEventRegister<T> eventRegister,
Instantiator instantiator,
ProjectInternal project) |
|
DefaultTaskCollection(Class<T> type,
Instantiator instantiator,
ProjectInternal project) |
|
DefaultTaskCollection(DefaultTaskCollection<? super T> collection,
CollectionFilter<T> filter,
Instantiator instantiator,
ProjectInternal project) |
| Modifier and Type | Method and Description |
|---|---|
protected UnknownDomainObjectException |
createNotFoundException(String name) |
protected <S extends T> |
filtered(CollectionFilter<S> filter)
Creates a filtered version of this collection.
|
String |
getTypeDisplayName() |
TaskCollection<T> |
matching(Closure spec)
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.
|
filteredStore, findAll, getDisplayNameadd, addRule, addRule, assertCanAdd, assertCanAdd, findByName, findByNameWithoutRules, getAsDynamicObject, getAsMap, getAt, getByName, getByName, getConvention, getElementsAsDynamicObject, getExtensions, getInstantiator, getNamer, getRules, handleAttemptToAddItemWithNonUniqueName, hasWithName, removeByNameaddAll, all, all, assertMutable, beforeChange, clear, contains, containsAll, createFilter, createFilter, createFilter, filteredEvents, findAll, getEventRegister, getStore, getType, isEmpty, iterator, remove, removeAll, retainAll, size, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypetoArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAt, getByName, getByNamefindAlladd, addAll, addRule, addRule, findByName, getAsMap, getNamer, getRulesall, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypeprotected final ProjectInternal project
public DefaultTaskCollection(Class<T> type, Instantiator instantiator, ProjectInternal project)
protected DefaultTaskCollection(Class<? extends T> type, Set<T> store, CollectionEventRegister<T> eventRegister, Instantiator instantiator, ProjectInternal project)
public DefaultTaskCollection(DefaultTaskCollection<? super T> collection, CollectionFilter<T> filter, Instantiator instantiator, ProjectInternal project)
protected <S extends T> DefaultTaskCollection<S> filtered(CollectionFilter<S> filter)
DefaultNamedDomainObjectCollectionfiltered in class DefaultNamedDomainObjectSet<T extends Task>public <S extends T> TaskCollection<S> withType(Class<S> type)
DomainObjectCollectionwithType in interface DomainObjectCollection<T extends Task>withType in interface NamedDomainObjectCollection<T extends Task>withType in interface NamedDomainObjectSet<T extends Task>withType in interface TaskCollection<T extends Task>withType in class DefaultNamedDomainObjectSet<T extends Task>type - The type of objects to find.public TaskCollection<T> matching(Spec<? super T> spec)
DomainObjectCollectionmatching in interface DomainObjectCollection<T extends Task>matching in interface NamedDomainObjectCollection<T extends Task>matching in interface NamedDomainObjectSet<T extends Task>matching in interface TaskCollection<T extends Task>matching in class DefaultNamedDomainObjectSet<T extends Task>spec - The specification to use.public TaskCollection<T> matching(Closure spec)
DomainObjectCollectionmatching in interface DomainObjectCollection<T extends Task>matching in interface NamedDomainObjectCollection<T extends Task>matching in interface NamedDomainObjectSet<T extends Task>matching in interface TaskCollection<T extends Task>matching in class DefaultNamedDomainObjectSet<T extends Task>spec - The specification to use. The closure gets a collection element as an argument.public Action<? super T> whenTaskAdded(Action<? super T> action)
TaskCollectionAction to be executed when a task is added to this collection.whenTaskAdded in interface TaskCollection<T extends Task>action - The action to be executedpublic void whenTaskAdded(Closure closure)
TaskCollectionwhenTaskAdded in interface TaskCollection<T extends Task>closure - The closure to be calledpublic String getTypeDisplayName()
getTypeDisplayName in class DefaultNamedDomainObjectCollection<T extends Task>protected UnknownDomainObjectException createNotFoundException(String name)
createNotFoundException in class DefaultNamedDomainObjectCollection<T extends Task>Copyright © 2013. All rights reserved