[jdom-interest] insertChild in Element

Elliotte Rusty Harold elharo at metalab.unc.edu
Fri Sep 1 05:02:22 PDT 2000

At 10:03 AM -0500 8/31/00, Brett McLaughlin wrote:

>OK, I think we can pretty much resolve this. I've seen two folks that
>want this functionality, you and Trevor Rude. And I know that Jason and
>I are in consensus that it really isn't needed. There is a real danger
>of API bloat in doing what you propose. I've also yet to see any
>use-case (referring to "good programming principles" just doesn't do it)
>for the need for this. Finally, every Java 2 developer is familiar with
>Collections, or should be. So I think it's safe to say that while this
>was good discussion, I'm even more convinced that getting the List and
>operating on it is sufficient. It would create at least 10-15 new
>methods that are exact copies of List methods, with new names!!, and not
>add any new functionality.

No, that's not what it would do. This discussion seems to have veered 
off track. The names would not be new names. The names would be the 
exact same names used currently in the List interface because the 
Element class would implement the List interface.

The fact is getting a List by invoking a method and then operating on 
it just isn't obvious to most people. It's not hard but it is 
confusing. We've seem that again and again on this mailing list. It 
would be more intuitive if all the methods needed were sitting right 
there in the Element class.

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |

More information about the jdom-interest mailing list