net.rim.device.api.collection
Interface ChainableCollection

All Superinterfaces:
CollectionEventSource, CollectionListener
All Known Implementing Classes:
UnsortedReadableList, ReadableListCombiner, LongSortedReadableList, IntSortedReadableList, BigUnsortedReadableList

public interface ChainableCollection
extends CollectionEventSource, CollectionListener

Base functionality for a collection that can receive and emit collection events.

Example

    private CollectionListenerManager _listeners = new CollectionListenerManager();

    public void addCollectionListener( Object listener ) {
        _listeners.addCollectionListener( listener ):
    }

    public void removeCollectionListener( Object listener ) {
        _listeners.removeCollectionListener( listener ):
    }

    // To fire events, do something like this:
    _listeners.fireReset( collection );

    // The CollectionListener implementations need to do the special handling
    // of the objects and then propagate the events on.  If the event isn't
    // handled, then it should be propagated, like this:
    public void reset( Collection collection ) {
        _listeners.fireReset( collection );
    }
  

See Also:
CollectionListener, CollectionEventSource

Methods inherited from interface net.rim.device.api.collection.CollectionEventSource
addCollectionListener, removeCollectionListener
 
Methods inherited from interface net.rim.device.api.collection.CollectionListener
elementAdded, elementRemoved, elementUpdated, reset
 



Copyright 1999-2004 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.