| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectca.odell.glazedlists.AbstractEventList<E>ca.odell.glazedlists.TransformedList<S,E>ca.odell.glazedlists.CollectionList<S,E>ca.odell.glazedlists.CompositeList<E>public class CompositeList<E>extends CollectionList<S,E>EventList composed of multiple source EventLists. This list
shows the contents of its source lists.
Note that all contained EventLists must use the same ListEventPublisher and
ReadWriteLock, particularly if this EventList is to be used my multiple threads
concurrently. To construct an EventList that shares the ListEventPublisher and
ReadWriteLock with this CompositeList, use createMemberList().
| EventList Overview | |
| Writable: | only set(int,Object) and remove(int) |
| Concurrency: | not thread safe |
| Performance: | reads: O(log N), writes O(log N) |
| Memory: | 96 bytes per element |
| Unit Tests: | N/A |
| Issues: | 25 93 96 162 |
Nested Class Summary |
Nested classes/interfaces inherited from class ca.odell.glazedlists.CollectionList<S,E> | |
CollectionList.Model | |
Field Summary |
Fields inherited from class ca.odell.glazedlists.TransformedList<S,E> | |
source | |
Fields inherited from class ca.odell.glazedlists.AbstractEventList<E> | |
publisher, readWriteLock, updates | |
Constructor Summary | |
| |
| |
Method Summary | |
void |
|
EventList |
|
void |
|
Methods inherited from class ca.odell.glazedlists.CollectionList<S,E> | |
childEndingIndex, childStartingIndex, dispose, get, listChanged, remove, set, size | |
Methods inherited from class ca.odell.glazedlists.TransformedList<S,E> | |
add, addAll, clear, dispose, get, getSourceIndex, isWritable, listChanged, remove, removeAll, retainAll, set, size | |
Methods inherited from class ca.odell.glazedlists.AbstractEventList<E> | |
T[] toArray, add, add, addAll, addAll, addListEventListener, clear, contains, containsAll, equals, get, getPublisher, getReadWriteLock, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeListEventListener, retainAll, set, size, subList, toArray, toString | |
public CompositeList()
public CompositeList(ListEventPublisher publisher, ReadWriteLock lock)
Create aCompositeListthat uses the givenpublisherandlock. Note that this publisher and lock will also be used whenbuilding new member lists. This can be a convenient constructor to use when the member lists are prebuilt ahead of time with a commonListEventPublisherandReadWriteLockand it is desirable to compose their union with aCompositeList.
- Parameters:
publisher- theListEventPublisherto use within theCompositeListlock- theReadWriteLockto use within theCompositeList
public CompositeList(ReadWriteLock lock)
Deprecated. replaced by
CompositeList(ListEventPublisher,ReadWriteLock), because prebuilt member lists should share lock and publisher with the CompositeList.Create aCompositeListthat uses the givenlock. Note that this lock will also be used whenbuilding new member lists. This can be a convenient constructor to use when the member lists are prebuilt ahead of time with a commonReadWriteLockand it is desirable to compose their union with aCompositeList.
- Parameters:
lock- theReadWriteLockto use within theCompositeList
public void addMemberList(EventListlist)
Adds the specifiedEventListas a source to thisCompositeList. To ensure correct behaviour when thisCompositeListis used by multiple threads, the specified EventList has to share the sameReadWriteLockandListEventPublisherwith this CompositeList.
- See Also:
createMemberList()
public EventListcreateMemberList()
Creates a newEventListthat shares itsReadWriteLockwith thisCompositeList. This is necessary when thisCompositeListwill be used by multiple threads. Note that the createdEventListmust be explicitly added as a member to thisCompositeListusingaddMemberList(EventList).
public void removeMemberList(EventListlist)