[jdom-interest] accessing Element.getChildren() elements with a ListIterator

Jason Hunter jhunter at collab.net
Fri Sep 1 02:36:15 PDT 2000


> I suppose i could do a toArray() on the List or something, but I thought that
> the reason for the List in the first place was so that you could do List style
> things to it.
> 
> Could someone please explain why the ListIterator approach doesn't work; if the
> fact that it doesn't work is a design decision, the basis for that decision; and
> if there are elegant alternative ways of doing this that I am missing, what
> those might be.

You don't say what doesn't work about it?  You mean it has no effect?

If so, it's likely PartialList needs to override listIterator() to
return an iterator smart enough to do the special work on the backling
list:  a PartialListIterator.  :-)

-jh-





More information about the jdom-interest mailing list