Inserts a child node at the specified position. The child node previously at that position (if any) and all subsequent child nodes are moved up by one. That is, when inserting a node at 2, the old node at 2 is moved to 3, the old child at 3 is moved to 4, and so forth. Inserting at position 0 makes the child the first child of this node. Inserting at the position getChildCount()
makes the child the last child of the node.
All the other methods that add a node to the tree ultimately invoke this method.
@param position where to insert the child
@param child the node to insert
@throws IllegalAddException if this node cannot have a child ofthe argument's type
@throws MultipleParentException if
child
already has a parent
@throws NullPointerException if
child
is null
@throws IndexOutOfBoundsException if the position is negative or greater than the number of children of this node