Antw: RE: [jdom-interest] insertChild in Element

Judith Andres J.Andres at
Thu Aug 31 07:52:03 PDT 2000

They're absolutely right about that.


>>> "David W. Smiley" <dsmiley at> 31.08.2000  16.01 Uhr >>>
I totally agree with what Tom Jenkins said:

> I don't think Element should implement List.  To my mental model,
> Element ->
> List is not an "is-a" relation, but rather a "has-a".
> The line:
>         element.getChildren().add(newElement, 3);
> makes perfect sense. But the alternative line:
>         element.add(newElement, 3);
> just doesn't feel right.

	Also, I don't think JDOM should have both getChildren and be the list
itself.  This means there are two ways to do the same thing which I
think should be avoided in an API.  It's not like we have to support
backwards-compatible JDOM clients as JDOM isn't yet v1.0.

-- David Smiley

To control your jdom-interest membership:

More information about the jdom-interest mailing list