public void move(SpanNode node, SpanList target) {
        boolean removed = children().remove(node);
        if (removed) {
            //we found the node
            node.setParent(null);
            resetCachedFromAndTo();
            target.add(node);
        } else {
            throw new IllegalArgumentException("Node " + node + " is not a child of this SpanList, cannot move.");
        }
    }
Moves a child of this SpanList to another SpanList.

@param node the node to move
@param target the SpanList to add the node to
@throws IllegalArgumentException if the given node is not a child of this SpanList
document/src/main/java/com/yahoo/document/annotation/SpanList.java