[jdom-interest] insertChild in Element

Jason Hunter jhunter at collab.net
Fri Sep 1 00:42:02 PDT 2000


BTW, in DOM the returned lists are live too.

-jh-

trebor.a.rude at lmco.com wrote:
> 
>         The counter to the argument against add() and such is that we
> actually return a PartialList (a JDOM-implemented subclass of LinkedList),
> so its implementations of the questionable functions could be changed to
> disallow anything "bad". The whole notion of a "live" list takes a little
> getting used to (simply because you just don't see it that often), but once
> you understand it, it makes a lot of sense. In my mind, the main argument
> for making Element implement List would be that the model would then be
> closer to the DOM, easing the transition for those used to that API.  But
> the function names of the List interface don't really make it clear that
> you're operating on children, as the functions in the DOM do. All in all, I
> don't think that compatibility with the DOM is that important, and in fact,
> I think it might be best if we removed some of the existing functions from
> Element (addContent/removeContent), and let those go through the list too.
> 
> Trebor A. Rude
> trebor.a.rude at lmco.com





More information about the jdom-interest mailing list