[jdom-interest] Iterator.remove() is calling a non-overloaded method to remove children from an element.

Peter V. Gadjokov pvg at c-c-s.com
Wed Sep 27 14:28:06 PDT 2000


>I suspect you could wrap a PartialListIterator around the ListItr normally
>returned, and have it remove the elt from the backing list and then let
>ListItr do its normal thing.

What's the difficulty in having a predicated (filtered) sub-list class that
is just a plain wrapper around a List (any List, not just a LinkedList) as
opposed to the strange wrapper'n'subclass beast that PartialList is?
PartialList strikes me as hard to follow and wasteful, I'm sure there is a
reason for it but I can't figure it out. 


-pvg

-----Original Message-----
From: Jason Hunter [mailto:jhunter at collab.net]
Sent: Wednesday, September 27, 2000 2:08 PM
To: Peter V. Gadjokov
Cc: 'Travers Waker'; jdom-interest at jdom.org
Subject: Re: [jdom-interest] Iterator.remove() is calling a
non-overloadedmethod to remove children from an element.


> It might be a little harder to fix than it looks, most 
> likely PartialList will have to provide its own Iterator 
> (or perhaps someone can write a ListView-type class that does 
. not replicate storage and is not so gory).

Yep.  It's not a trivial fix (thus it's in the TODO.txt file and not
already done in the code) but it's a pretty straightforward fix.  

-jh-



More information about the jdom-interest mailing list