dsto.dfc.collections
Class SuperSet

java.lang.Object
  extended by dsto.dfc.collections.BasicMonitoredCollection
      extended by dsto.dfc.collections.BasicMonitoredSet
          extended by dsto.dfc.collections.SuperSet
All Implemented Interfaces:
CollectionListener, MonitoredCollection, MonitoredSet, Copyable, Disposable, Serializable, Cloneable, Iterable, Collection, EventListener, Set

public class SuperSet
extends BasicMonitoredSet
implements CollectionListener, Disposable

A superset of a number of subsets.

NOTE: This class will currently not serialize correctly.

Version:
$Revision$
Author:
mpp
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class dsto.dfc.collections.BasicMonitoredCollection
BasicMonitoredCollection.CollectionIteratorWrapper
 
Field Summary
 
Fields inherited from class dsto.dfc.collections.BasicMonitoredCollection
collection, collectionListeners
 
Constructor Summary
SuperSet()
          Constructor for SuperSet.
SuperSet(Set set)
           
 
Method Summary
 void addSubset(Set subset)
           
 void dispose()
          Dispose of the object (unregister listeners, close open resources etc).
 void elementsAdded(CollectionEvent e)
           
 void elementsRemoved(CollectionEvent e)
           
 boolean remove(Object element)
          Remove an element from all subsets.
 boolean removeAll(Collection elements)
          Remove all elements from each subset individually.
 void removeSubset(Set subset)
          NOTE: this may be significantly slower than addSubset ()
 
Methods inherited from class dsto.dfc.collections.BasicMonitoredCollection
add, addAll, addCollectionListener, clear, clone, contains, containsAll, emptyClone, fireElementsAdded, fireElementsRemoved, isEmpty, iterator, removeCollectionListener, retainAll, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface dsto.dfc.collections.MonitoredCollection
addCollectionListener, removeCollectionListener
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, retainAll, size, toArray, toArray
 

Constructor Detail

SuperSet

public SuperSet()
Constructor for SuperSet.


SuperSet

public SuperSet(Set set)
Method Detail

dispose

public void dispose()
Description copied from interface: Disposable
Dispose of the object (unregister listeners, close open resources etc). It should be safe to call this method more than once. Note for beans that support client event listeners: if there are listeners registered when this is called, this method should do nothing.

Specified by:
dispose in interface Disposable

addSubset

public void addSubset(Set subset)

removeSubset

public void removeSubset(Set subset)
NOTE: this may be significantly slower than addSubset ()


elementsAdded

public void elementsAdded(CollectionEvent e)
Specified by:
elementsAdded in interface CollectionListener

elementsRemoved

public void elementsRemoved(CollectionEvent e)
Specified by:
elementsRemoved in interface CollectionListener

remove

public boolean remove(Object element)
Remove an element from all subsets. If the subsets are not MonitoredCollection's, this is will not correctly fire an element removed event.

Specified by:
remove in interface Collection
Specified by:
remove in interface Set
Overrides:
remove in class BasicMonitoredCollection

removeAll

public boolean removeAll(Collection elements)
Remove all elements from each subset individually. If the subsets are not MonitoredCollection's, this is will not correctly fire an element removed event.

Specified by:
removeAll in interface Collection
Specified by:
removeAll in interface Set
Overrides:
removeAll in class BasicMonitoredCollection


Copyright © 2008 Commonwealth of Australia