docs: public void reindexItems() {
      if (numUnsortedItems > 0) {
        int[] newSortedKeys = Arrays.copyOf(sortedKeys, sortedKeys.length + numUnsortedItems);
        int[] newSortedValues = Arrays.copyOf(sortedValues, sortedValues.length + numUnsortedItems);
  
        int oldLength = sortedKeys.length;
        for (int i = 0; i < numUnsortedItems; i++) {
          newSortedKeys[i + oldLength] = unsortedKeys[i];
          newSortedValues[i + oldLength] = unsortedValues[i];
        }
  
        ArrayUtils.sortKeyValuePairs(newSortedKeys, newSortedValues, 0, newSortedKeys.length);
  
        sortedKeys = newSortedKeys;
        sortedValues = newSortedValues;
        numUnsortedItems = 0;
        
        rebuildKeySet();
      }
    }