private List<SpanNode> getSpanNodes() {
        ArrayList<SpanNode> nodes = new ArrayList<>();
        nodes.add(root);
        Iterator<SpanNode> it = root.childIteratorRecursive();
        while (it.hasNext()) {
            nodes.add(it.next());
        }
        return nodes;
    }
Creates a new SpanTree with the given name and an empty SpanList as its root node.

@param name the name of the span tree
document/src/main/java/com/yahoo/document/annotation/SpanTree.java