void (int key, @NotNull V value) { if (key >= myData.length) { int newCapacity = myData.length; while (newCapacity <= key) { newCapacity <<= 1; } myData = Arrays.copyOf(myData, newCapacity); } if (myData[key] == null) { mySize++; } myData[key] = value; myMaxUsed = Math.max(myMaxUsed, key); }