(Node child, Node newChild)
| 297 | } |
| 298 | |
| 299 | public void replaceChild(Node child, Node newChild) { |
| 300 | if (child == newChild) return; |
| 301 | newChild.next = child.next; |
| 302 | if (child == first) { |
| 303 | first = newChild; |
| 304 | } else { |
| 305 | Node prev = getChildBefore(child); |
| 306 | prev.next = newChild; |
| 307 | } |
| 308 | if (child == last) last = newChild; |
| 309 | child.next = null; |
| 310 | } |
| 311 | |
| 312 | public void replaceChildAfter(Node prevChild, Node newChild) { |
| 313 | Node child = prevChild.next; |
no test coverage detected