public SpanList add(SpanNode node) {
        checkValidity(node, children());
        node.setParent(this);
        resetCachedFromAndTo();
        children().add(node);
        return this;
    }
Adds a child node to this SpanList.

@param node the node to add.
@return this, for call chaining
@throws IllegalStateException if SpanNode.isValid() returns false.
document/src/main/java/com/yahoo/document/annotation/SpanList.java