[jdom-interest] Sorting Children, Collections.sort, ComodificationException, etc., etc.
Bradley S. Huffman
hip at a.cs.okstate.edu
Mon Sep 23 10:34:33 PDT 2002
Damn, your right :( I'm beginning to really hate "live" lists. What I really
want is setContent() to return a List of the old children detached instead
"this element modified".
Brad
Gordon Tyler writes:
> Bradley S. Huffman wrote:
>
> > public static void sortContent(Element element, Comparator comparator) {
> > // Get a List of the current children
> > List contentList = element.getContent();
> >
> > // Temporarily remove all content
> > element.setContent(null);
>
> But since the list returned by element.getContent() is a "live" list,
> wouldn't this statement empty contentList?
>
> Ciao,
> Gordon
>
> --
> Gordon Tyler
> Software Developer, R&D
> Sitraka -- Performance is Mission Critical
>
More information about the jdom-interest
mailing list