public int intern(Object k){
	int hash = hash(k);
	int mask = cap - 1;
	int bkt = (hash & mask);
	int bhash = hopidx[bkt<<2];

	int slot;
	Object bkey;

	if(bhash == 0)
		slot = bkt << 2;
	else
		{
		if(hash == bhash)
			{
			bkey = keys[hopidx[(bkt<<2) + 1]];
			if(k.equals(bkey))
				return hopidx[(bkt<<2) + 1];
			}
		for(;(bhash = hopidx[(bkt<<2) + 2]) != 0; bkt = (bkt + 1) & mask)
			{
			if(hash == bhash)
				{
				bkey = keys[hopidx[(bkt<<2) + 3]];
				if(k.equals(bkey))
					return hopidx[(bkt<<2) + 3];
				}
			}
		slot = (bkt<<2) + 2;
		}

	int i = count;
	hopidx[slot] = hash;
	hopidx[slot + 1] = i;
	keys[i] = k;
	++count;

	if(count == cap)
		resize();

	return i;
}