pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noel Grandin <noelgran...@gmail.com>
Subject Re: More collection issues
Date Mon, 19 Apr 2010 12:41:08 GMT

On 2010-04-19 13:57, Greg Brown wrote:
>> 2. The immutable collection classes (ImmutableList/Map/Set) expose their own private
List/Set/MapListeners, which makes them completely useless -- never will those listeners report
any modification. Instead, the methods getListListeners(), getMapListeners(), getSetListeners()
should delegate to the wrapped List/Map/Set instance, so that the users of the immutable view
still get reported about modifications of the wrapped collection.
> That would sort of defeat the purpose of the wrapper class. When using immutable collections,
the caller should not still be modifying the underlying collection. The caller certainly should
not be under the expectation that the immutable collection will fire any events (especially
from a different collection).

Might be an interesting idea to make the immutable classes add a
listener to their wrapped object and whinge loudly if someone does
modify the underlying class.

  Noel "fail early, fail loudly" Grandin

View raw message