private void checkEnoughCapacity(int number) {
        int len = keys.length;
        if (len - currentSize < number) {
            // Make inner arrays two times longer
            changeCapacityBy(keys, len);
            changeCapacityBy(values, len);
        } else if (currentSize < len / 4 && len / 2 > INITIAL_CAPACITY) {
            // Make inner arrays two times shorter if only quarter is used
            changeCapacityBy(keys, -len / 2);
            changeCapacityBy(values, -len / 2);
        }
    }