public class DefaultNamedDomainObjectSet<T> extends DefaultNamedDomainObjectCollection<T> implements NamedDomainObjectSet<T>
| Modifier | Constructor and Description |
|---|---|
|
DefaultNamedDomainObjectSet(Class<? extends T> type,
Instantiator instantiator) |
|
DefaultNamedDomainObjectSet(Class<? extends T> type,
Instantiator instantiator,
Namer<? super T> namer) |
protected |
DefaultNamedDomainObjectSet(Class<? extends T> type,
Set<T> store,
CollectionEventRegister<T> eventRegister,
Instantiator instantiator,
Namer<? super T> namer)
Subclasses using this constructor must ensure that the
store uses a name based equality strategy as per the contract on NamedDomainObjectContainer. |
|
DefaultNamedDomainObjectSet(DefaultNamedDomainObjectSet<? super T> collection,
CollectionFilter<T> filter,
Instantiator instantiator,
Namer<? super T> namer) |
| Modifier and Type | Method and Description |
|---|---|
protected <S extends T> |
filtered(CollectionFilter<S> filter)
Creates a filtered version of this collection.
|
protected <S extends T> |
filteredStore(CollectionFilter<S> filter) |
Set<T> |
findAll(Closure cl)
Returns a collection which contains the objects in this collection which meet the given closure specification.
|
String |
getDisplayName() |
NamedDomainObjectSet<T> |
matching(Closure spec)
Returns a collection which contains the objects in this collection which meet the given closure specification.
|
NamedDomainObjectSet<T> |
matching(Spec<? super T> spec)
Returns a collection which contains the objects in this collection which meet the given specification.
|
<S extends T> |
withType(Class<S> type)
Returns a collection containing the objects in this collection of the given type.
|
add, addRule, addRule, assertCanAdd, assertCanAdd, createNotFoundException, findByName, findByNameWithoutRules, getAsDynamicObject, getAsMap, getAt, getByName, getByName, getConvention, getElementsAsDynamicObject, getExtensions, getInstantiator, getNamer, getRules, getTypeDisplayName, 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, waitadd, addAll, addRule, addRule, findByName, getAsMap, getAt, getByName, getByName, getNamer, getRulesall, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypepublic DefaultNamedDomainObjectSet(Class<? extends T> type, Instantiator instantiator, Namer<? super T> namer)
public DefaultNamedDomainObjectSet(Class<? extends T> type, Instantiator instantiator)
protected DefaultNamedDomainObjectSet(Class<? extends T> type, Set<T> store, CollectionEventRegister<T> eventRegister, Instantiator instantiator, Namer<? super T> namer)
store uses a name based equality strategy as per the contract on NamedDomainObjectContainer.public DefaultNamedDomainObjectSet(DefaultNamedDomainObjectSet<? super T> collection, CollectionFilter<T> filter, Instantiator instantiator, Namer<? super T> namer)
protected <S extends T> DefaultNamedDomainObjectSet<S> filtered(CollectionFilter<S> filter)
DefaultNamedDomainObjectCollectionfiltered in class DefaultNamedDomainObjectCollection<T>protected <S extends T> Set<S> filteredStore(CollectionFilter<S> filter)
filteredStore in class DefaultDomainObjectCollection<T>public String getDisplayName()
getDisplayName in class DefaultNamedDomainObjectCollection<T>public <S extends T> NamedDomainObjectSet<S> withType(Class<S> type)
DomainObjectCollectionwithType in interface DomainObjectCollection<T>withType in interface NamedDomainObjectCollection<T>withType in interface NamedDomainObjectSet<T>withType in class DefaultNamedDomainObjectCollection<T>type - The type of objects to find.public NamedDomainObjectSet<T> matching(Spec<? super T> spec)
DomainObjectCollectionmatching in interface DomainObjectCollection<T>matching in interface NamedDomainObjectCollection<T>matching in interface NamedDomainObjectSet<T>matching in class DefaultNamedDomainObjectCollection<T>spec - The specification to use.public NamedDomainObjectSet<T> matching(Closure spec)
DomainObjectCollectionmatching in interface DomainObjectCollection<T>matching in interface NamedDomainObjectCollection<T>matching in interface NamedDomainObjectSet<T>matching in class DefaultNamedDomainObjectCollection<T>spec - The specification to use. The closure gets a collection element as an argument.public Set<T> findAll(Closure cl)
DomainObjectCollectionfindAll in interface DomainObjectCollection<T>findAll in interface NamedDomainObjectSet<T>findAll in class DefaultDomainObjectCollection<T>cl - The specification to use. The closure gets a collection element as an argument.Copyright © 2013. All rights reserved