@Override
    public int getTo() {
        if (children().isEmpty()) {
            return -1;
        }
        if (cachedTo == Integer.MIN_VALUE) {
            calculateTo();
        }
        return cachedTo;
    }
Returns the character index where this {@link SpanNode} ends (exclusive), i.e.&nbsp;the greatest {@link com.yahoo.document.annotation.SpanNode#getTo()} of all children.

@return the greatest getTo() of all children, or -1 if this SpanList has no children.
document/src/main/java/com/yahoo/document/annotation/SpanList.java