public static long shift(long range, int deltaStart, int deltaEnd) {
    int newEnd = Math.max(endOffset(range) + deltaEnd, 0);
    int newStart = MathUtil.clamp(startOffset(range) + deltaStart, 0, newEnd);

    return toScalarRange(newStart, newEnd);
  }
public static long shift(long range, int deltaStart, int deltaEnd)