docs: public static void boundsCheck(int capacity, int index, int length) {
          if (capacity < 0 || index < 0 || length < 0 || (index > (capacity - length))) {
              throw new IndexOutOfBoundsException(String.format("index=%d, length=%d, capacity=%d", index, length, capacity));
          }
      }