docs: public int locateIndex(int index) {
  
          int min = 0;
          int max = this.indexValues.length - 1;
  
          if (max == -1) {
              return -1;
          }
  
          // Binary search
          while ((this.indexValues[min] <= index) && (this.indexValues[max] >= index)) {
              int current = (max + min) / 2;
              if (this.indexValues[current] > index) {
                  max = current - 1;
              } else if (this.indexValues[current] < index) {
                  min = current + 1;
              } else {
                  return current;
              }
          }
          if (this.indexValues[max] < index) {
              return max;
          } else {
              return min - 1;
          }
      }