text: public void put(int key, int value) {int i = binarySearch(mKeys, 0, mSize, key);if (i >= 0) {mValues[i] = value;} else {i = ~i;if (mSize >= mKeys.length) {int n = ArrayUtils.idealIntArraySize(mSize + 1);int[] nkeys = new int[n];int[] nvalues = new int[n];System.arraycopy(mKeys, 0, nkeys, 0, mKeys.length);System.arraycopy(mValues, 0, nvalues, 0, mValues.length);mKeys = nkeys;mValues = nvalues;}if (mSize - i != 0) {System.arraycopy(mKeys, i, mKeys, i + 1, mSize - i);System.arraycopy(mValues, i, mValues, i + 1, mSize - i);}mKeys[i] = key;mValues[i] = value;mSize++;}}