public V put(final int key, final V value) {
        final Entry<V>[] table = this.table;
        final int index = HashUtil.indexFor(key, table.length, mask);

        for (Entry<V> e = table[index]; e != null; e = e.hashNext) {
            if (e.key == key) {
                return e.setValue(value);
            }
        }

        final Entry<V> e = new Entry<>(key, value);
        e.hashNext = table[index];
        table[index] = e;
        _size += 1;

        if (_size > capacity) {
            rehash(HashUtil.nextCapacity(capacity));
        }
        return null;
    }
@Test
    public void forEachProcedure() {
        final IntHashMap<String> tested = new IntHashMap<>();
        for (int i = 0; i < 100000; ++i) {
            tested.put(i, Integer.toString(i));
        }
        final int[] ii = {0};
        tested.forEachKey(object -> {
            ii[0]++;
            return true;
        });
        tested.forEachValue(object -> {
            ii[0]++;
            return true;
        });
        Assert.assertEquals(tested.size() * 2, ii[0]);
        ii[0] = 0;
        tested.forEachKey(object -> {
            ii[0]++;
            return object < 500;
        });
        tested.forEachValue(object -> {
            ii[0]++;
            return true;
        });
        Assert.assertEquals(tested.size() + 501, ii[0]);
    }