public DiskRangeList insertPartBefore(DiskRangeList other) {
    checkArg(other);
    if (other.end <= this.offset || other.end > this.end) {
      assertInvalidOrder(this.prev == null ? this : this.prev, other, this);
    }
    this.offset = other.end;
    other.prev = this.prev;
    other.next = this;
    if (this.prev != null) {
      checkOrder(this.prev, other, this.prev);
      this.prev.next = other;
    }
    this.prev = other;
    return other;
  }
Inserts an intersecting range before current in the list and adjusts offset accordingly.
@param other the element to insert
@return the new element.
storage-api/src/java/org/apache/hadoop/hive/common/io/DiskRangeList.java