Logo Search packages:      
Sourcecode: jclic version File versions  Download package

Element org::jdom::Element::setContent ( int  index,
Content  child 
) [inline]

Replace the current child the given index with the supplied child.

In event of an exception the original content will be unchanged and the supplied child will be unaltered.

index - index of child to replace.
child - child to add.
element on which this method was invoked
IllegalAddException if the supplied child is already attached or not legal content for this parent.
IndexOutOfBoundsException if index is negative or greater than the current number of children.

Definition at line 769 of file Element.java.

References content, and org::jdom::ContentList::set().

        content.set(index, child);
        return this;

Generated by  Doxygen 1.6.0   Back to index