From: Doug C. <de...@fl...> - 2002-02-23 04:55:57
|
> The trouble with this approach is I think it will make the rest of the > code more prone to bugs if its more difficult to distinguish between a > persistent collection and a view of the persistent collection. And from > a modelling point of view, what the hell do the following methods <snip> OK, that's why I asked. I modified SortedMap to match your design. Two questions: In map.entrySet() you have a comment about wrapping proxies around the Map.Entry instances in the set. I don't see why this is necessary. The only affective operation on Map.Entry is setValue(); you can't change the key. Therefore I don't see any way to use it to change the structure of the map. You must use the iterator itself to remove elements. So, I implemented this differently in SortedSubMap; if you agree, we should change Map#entrySet(). Neither Map nor SortedMap copy the maps supplied in the contructor the way the Set and SortedSet do. Is this necessary? e |