public SortKey thenByInt(int value, int start, int end) {
    if (start > end) {
      return thenByInt(start - value, end, start);
    }
    int levels = end + 1 - start;
    if (value < start || value > end) {
      value = Math.clamp(value, start, end);
    }
    return accumulate(value, start, levels);
  }
Adds a field to this sort key where if all previous values are equal, then elements where {@code value == start}
sort before elements where {@code value == end}.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/SortKey.java