code: public boolean overlaps(Span other) {
        return other != null && this.start() < other.end() && this.end() > other.start();
     }
docs: Returns true if the bounds of other text are connected with the bounds of this text.
  
  @param other The other text to check if this one overlaps
  @return True if the two texts are in the same document and overlap, False otherwise