commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael L. Heuer" <heue...@acm.org>
Subject Re: [collections] Observable next steps
Date Sat, 24 May 2003 23:52:56 GMT

On Sat, 24 May 2003, Stephen Colebourne wrote:

> Proposed design:
>
> CollectionListener class:
>  elementsAdded(CollectionChangeEvent)
>  elementsRemoved(CollectionChangeEvent)
>  elementsChanged(CollectionChangeEvent)
>
> CollectionChangeEvent:
>  Collection collection - the collection (current reference, ie. after
> change)
>  int numberChanged - the number of elements changing
>  int changeIndex - for Lists, the index where the change starts
>  Object changed - the value/collection being added/removed/changed
>  boolean bulkOperation - true if addAll() etc. or clear()
>  int oldSize - size before change
>  int newSize - size after change
>  boolean sizeChanged - (derived from previous two)
>
> Maps would have their own listener and event.
>
> Michael, you submitted a lot of code that could be extended to form this
> design. Are you able and willing to do the work?
>
> Notes:
> - A second decorator() method should be added that takes in a Listener
> - The decorator() methods should return ObservableXxx.

This sounds pretty reasonable.

I'll flesh out what I currently have with the changes to the listener and
event classes and the decorator methods and post a new source tarball in a
few days.

   michael


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message