commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject Re: [collections] Size and scope issues
Date Mon, 19 Apr 2004 21:50:39 GMT
From: "Noel J. Bergman" <>
> > > - ALL the Unmodifiable crap
> > I can understand this. The reason the classes exist is for
> > completeness and practicality. [collections] has interfaces
> > that are not in the JDK, and they need unmodifiable decorators
> Steve, this is where I was wondering about the approach used in the
> message posted today.  Would that help, if applied consistently across
> [collections]?
Not really. Proxying would require a simple matching straegy.

However, each collection has its own tricks when it comes to writing
decorators. For an unmodifiable map for example, you must trap the main map,
the keySet, the values collection and the entrySet. Plus you must trap the
setValue on exposed MapEntry objects from the entrySet iterator and the

Sometime, I think this is what many people looking at collections don't
appreciate. Implementing the collection interfaces, especially the maps, can
be really hard.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message