Appends the specified node to the end of this node's children, assuming the specified node is clean (doesn't have preexisting relationships to other nodes). @param node the node to append to this node's children
(final DomNode node)
| 951 | * @param node the node to append to this node's children |
| 952 | */ |
| 953 | private void basicAppend(final DomNode node) { |
| 954 | // try to make the node setup as complete as possible |
| 955 | // before the node is reachable |
| 956 | node.setPage(getPage()); |
| 957 | node.parent_ = this; |
| 958 | |
| 959 | if (firstChild_ == null) { |
| 960 | firstChild_ = node; |
| 961 | } |
| 962 | else { |
| 963 | final DomNode last = getLastChild(); |
| 964 | node.previousSibling_ = last; |
| 965 | node.nextSibling_ = null; // safety first |
| 966 | |
| 967 | last.nextSibling_ = node; |
| 968 | } |
| 969 | firstChild_.previousSibling_ = node; |
| 970 | } |
| 971 | |
| 972 | /** |
| 973 | * {@inheritDoc} |
no test coverage detected