private final static void checkOrder(DiskRangeList prev, DiskRangeList next, DiskRangeList ref) {
    if (prev.getEnd() <= next.getOffset()) return;
    assertInvalidOrder(ref.prev == null ? ref : ref.prev, prev, next);
  }
Replaces this element with another in the list; returns the new element.
@param other the disk range to swap into this list
@return the new element
storage-api/src/java/org/apache/hadoop/hive/common/io/DiskRangeList.java