void (int key, double value) { int index = key - anchor; if (index >= data.length) { int newLength = data.length << 1; while (newLength <= index && newLength > 0) { newLength <<= 1; } data = ArrayUtil.realloc(data, newLength); } data[index] = value; if (index >= end) { end = index + 1; } }