public void setLength(int length) {
        if (length < 0) {
            throw new IllegalArgumentException("Length cannot be < 0. (Was " + length + ").");
        }
        this.length = length;
    }
NOTE: DO NOT USE. Should only be used by {@link com.yahoo.document.serialization.SpanNodeReader}.
@param length the length value to set
document/src/main/java/com/yahoo/document/annotation/Span.java