ca.odell.glazedlists
Class CompositeList<E>

java.lang.Object
  extended by ca.odell.glazedlists.AbstractEventList<E>
      extended by ca.odell.glazedlists.TransformedList<S,E>
          extended by ca.odell.glazedlists.CollectionList<EventList<E>,E>
              extended by ca.odell.glazedlists.CompositeList<E>
All Implemented Interfaces:
ListEventListener<EventList<E>>, EventList<E>, Iterable<E>, Collection<E>, EventListener, List<E>

public class CompositeList<E>
extends CollectionList<EventList<E>,E>

An EventList composed of multiple source EventLists. This list shows the contents of its source lists.

Note that all contained EventLists must use the same ReadWriteLock if this EventList is to be used my multiple threads concurrently. To construct an EventList that shares the ReadWriteLock with this CompositeList, use createMemberList() or new BasicEventList(CompositeList.getReadWriteLock())

EventList Overview
Writable:only CollectionList.set(int,Object) and CollectionList.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

Author:
Jesse Wilson

Nested Class Summary
 
Nested classes/interfaces inherited from class ca.odell.glazedlists.CollectionList
CollectionList.Model<E,S>
 
Field Summary
 
Fields inherited from class ca.odell.glazedlists.TransformedList
source
 
Fields inherited from class ca.odell.glazedlists.AbstractEventList
publisher, readWriteLock, updates
 
Constructor Summary
CompositeList()
           
 
Method Summary
 void addMemberList(EventList<E> list)
          Adds the specified EventList as a source to this CompositeList.
 EventList<E> createMemberList()
          Creates a new EventList that shares its ReadWriteLock with this CompositeList.
 void removeMemberList(EventList<E> list)
          Removes the specified EventList as a source EventList to this CompositeList.
 
Methods inherited from class ca.odell.glazedlists.CollectionList
childEndingIndex, childStartingIndex, get, listChanged, remove, set, size
 
Methods inherited from class ca.odell.glazedlists.TransformedList
add, addAll, clear, dispose, getSourceIndex, isWritable, removeAll, retainAll
 
Methods inherited from class ca.odell.glazedlists.AbstractEventList
add, addAll, addListEventListener, contains, containsAll, equals, getPublisher, getReadWriteLock, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeListEventListener, subList, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeList

public CompositeList()
Method Detail

addMemberList

public void addMemberList(EventList<E> list)
Adds the specified EventList as a source to this CompositeList.


createMemberList

public EventList<E> createMemberList()
Creates a new EventList that shares its ReadWriteLock with this CompositeList. This is necessary when this CompositeList will be used by multiple threads.

Note that the created EventList must be explicitly added as a member to this CompositeList using addMemberList(EventList).


removeMemberList

public void removeMemberList(EventList<E> list)
Removes the specified EventList as a source EventList to this CompositeList.



Glazed Lists 1.5.0, Copyright © 2003-2005 publicobject.com, O'Dell Engineering.
Documentation build by James Lemieux at 2005-12-21 23:25