T
- The type of domain objects in this set.public interface DomainObjectSet<T> extends DomainObjectCollection<T>, Set<T>
A DomainObjectSet
is a specialisation of DomainObjectCollection
that guarantees Set
semantics.
Modifier and Type | Method and Description |
---|---|
Set<T> |
findAll(Closure spec)
Returns a collection which contains the objects in this collection which meet the given closure specification.
|
DomainObjectSet<T> |
matching(Closure spec)
Returns a collection which contains the objects in this collection which meet the given closure specification.
|
DomainObjectSet<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.
|
all, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType
<S extends T> DomainObjectSet<S> withType(Class<S> type)
withType
in interface DomainObjectCollection<T>
type
- The type of objects to find.DomainObjectSet<T> matching(Spec<? super T> spec)
matching
in interface DomainObjectCollection<T>
spec
- The specification to use.DomainObjectSet<T> matching(Closure spec)
matching
in interface DomainObjectCollection<T>
spec
- The specification to use. The closure gets a collection element as an argument.Set<T> findAll(Closure spec)
findAll
in interface DomainObjectCollection<T>
spec
- The specification to use. The closure gets a collection element as an argument.