nl.knowledgeplaza.util.collection
Interface ObservableCollection

All Known Implementing Classes:
ObservableList, ObservableListWrapper, ObservableMap, ObservableSet, ObservableSortedMap, ObservableSortedSet

public interface ObservableCollection

The ObservableCollection interface acts as a super interface for all the collection objects in the Observable framework. It requires its implementors to store its own listeners.

Although the Map and Bag are technically according to Sun not a Collection, they are used through the Collections framework as if they are. This inconsistency is carried through to this package, as a Map and Bag are treated as a normal collection for ease of use and consistency throughout the framework.


Method Summary
 void addCollectionListener(CollectionListener l)
          Adds a CollectionListener to the collection
 java.lang.Object getObservedCollection()
          To access the collection that is being observed.
 void removeCollectionListener(CollectionListener l)
          Removes a CollectionListener to the collection
 

Method Detail

addCollectionListener

void addCollectionListener(CollectionListener l)
Adds a CollectionListener to the collection

Parameters:
l - the listener

removeCollectionListener

void removeCollectionListener(CollectionListener l)
Removes a CollectionListener to the collection

Parameters:
l - the listener

getObservedCollection

java.lang.Object getObservedCollection()
To access the collection that is being observed.

Returns:
Unfortunately not all collections implement one interface, so the return type depends on the observed collection.


Copyright © 2010. All Rights Reserved.