[jdom-interest] Request for new methods removeText(), replaceText(), & replaceContent().

Ken Rune Helland kenh at csc.no
Thu Mar 22 23:54:55 PST 2001


At 03:09 PM 3/20/2001 -0800, Jason Hunter wrote:

[SNIP]

> >         public void replaceContent( Element oldElement, Element 
> newElement );
>
>This one there may be a use for.  List doesn't have a replace() method.
>Too bad.  But you can simulate it easily enough, so I'm not sure it's
>worth the API bloat.
>
>-jh-

the java.util.List interface defines a set(int index,Object obj)
metod that replaces the object at the specified index.

the java.util.ListIterator interface defines a set(Object obj)
metod that replace the last object returned by next() or previus().
This will be more efficient on a linked list.

Not exactly the same as the proposed replaceContent(..) but pretty close.

I asume the PartialList reimplementation/replacement will support these
metods correctly.


Best Regards
KenR




More information about the jdom-interest mailing list