public class NamedCollection<T extends IHasName & INotifyPropertyValueChanged> extends UndoableCollection<T>
| Modifier and Type | Method and Description |
|---|---|
void |
addNamedCollectionListener(NamedCollectionListener<T> listener)
Registers listener so that it will receive events from the collection.
|
boolean |
contains(java.lang.String name)
Determines whether an element with the specified name is in the collection.
|
T |
get(java.lang.String name)
Gets the item with the specified name.
|
protected void |
onCollectionChanged(CollectionChangedEvent e)
Raises the
collectionChanged event. |
void |
removeNamedCollectionListener(NamedCollectionListener<T> listener)
Unregisters listener so that it will no longer receive collection events.
|
addCollectionListener, contains, get, getWorkbook, indexOf, iterator, removeCollectionListener, size, trackAdd, trackClear, trackMove, trackRemove, trackReplaceadd, addAll, clear, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringpublic void addNamedCollectionListener(NamedCollectionListener<T> listener)
listener - An object implementing the NamedCollectionListener interface.public void removeNamedCollectionListener(NamedCollectionListener<T> listener)
listener - An object implementing the NamedCollectionListener interface.protected void onCollectionChanged(CollectionChangedEvent e)
collectionChanged event.onCollectionChanged in class UndoableCollection<T extends IHasName & INotifyPropertyValueChanged>e - An object providing the event data.public boolean contains(java.lang.String name)
name - The name of the item to locate in the collection.true if item with the specified name is found
in the collection; otherwise, false.public T get(java.lang.String name)
name - The name of the item to get.