public class DefaultPluginCollection<T extends Plugin> extends DefaultDomainObjectSet<T> implements PluginCollection<T>
| Modifier | Constructor and Description |
|---|---|
|
DefaultPluginCollection(Class<T> type) |
protected |
DefaultPluginCollection(DefaultPluginCollection<? super T> collection,
CollectionFilter<T> filter) |
| Modifier and Type | Method and Description |
|---|---|
protected <S extends T> |
filtered(CollectionFilter<S> filter) |
PluginCollection<T> |
matching(Closure spec)
Returns a collection which contains the objects in this collection which meet the given closure specification.
|
PluginCollection<T> |
matching(Spec<? super T> spec)
Returns a collection which contains the objects in this collection which meet the given specification.
|
Action<? super T> |
whenPluginAdded(Action<? super T> action)
Adds an
Action to be executed when a plugin is added to this collection. |
void |
whenPluginAdded(Closure closure)
Adds a closure to be called when a plugin 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, findAlladd, addAll, 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, waitfindAllall, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypeprotected DefaultPluginCollection(DefaultPluginCollection<? super T> collection, CollectionFilter<T> filter)
protected <S extends T> DefaultPluginCollection<S> filtered(CollectionFilter<S> filter)
filtered in class DefaultDomainObjectSet<T extends Plugin>public <S extends T> PluginCollection<S> withType(Class<S> type)
DomainObjectCollectionwithType in interface DomainObjectCollection<T extends Plugin>withType in interface DomainObjectSet<T extends Plugin>withType in interface PluginCollection<T extends Plugin>withType in class DefaultDomainObjectSet<T extends Plugin>type - The type of objects to find.public PluginCollection<T> matching(Spec<? super T> spec)
DomainObjectCollectionmatching in interface DomainObjectCollection<T extends Plugin>matching in interface DomainObjectSet<T extends Plugin>matching in interface PluginCollection<T extends Plugin>matching in class DefaultDomainObjectSet<T extends Plugin>spec - The specification to use.public PluginCollection<T> matching(Closure spec)
DomainObjectCollectionmatching in interface DomainObjectCollection<T extends Plugin>matching in interface DomainObjectSet<T extends Plugin>matching in interface PluginCollection<T extends Plugin>matching in class DefaultDomainObjectSet<T extends Plugin>spec - The specification to use. The closure gets a collection element as an argument.public Action<? super T> whenPluginAdded(Action<? super T> action)
PluginCollectionAction to be executed when a plugin is added to this collection.whenPluginAdded in interface PluginCollection<T extends Plugin>action - The action to be executedpublic void whenPluginAdded(Closure closure)
PluginCollectionwhenPluginAdded in interface PluginCollection<T extends Plugin>closure - The closure to be calledCopyright © 2013. All rights reserved