code: public boolean isConnected(Interval other) {
          Objects.requireNonNull(other, "other");
          return this.equals(other) || (start.compareTo(other.end) <= 0 && other.start.compareTo(end) <= 0);
      }
docs: Checks if this interval is connected to the specified interval.
  <p>
  The result is true if the two intervals have an enclosed interval in common, even if that interval is empty.
  An empty interval is connected to itself.
  <p>
  This is equivalent to {@code (overlaps(other) || abuts(other))}.
  
  @param other  the other interval, not null
  @return true if this interval is connected to the other interval