int (Object[] a, K key) { int hash = keyValueMapper.hash(key) & 0x7fffffff; int index = hash % a.length; V candidate = (V)a[index]; if (candidate == null || keyValueMapper.valueHasKey(candidate, key)) { return index; } final int probe = 1 + (hash % (a.length - 2)); do { index -= probe; if (index < 0) index += a.length; candidate = (V)a[index]; } while (candidate != null && !keyValueMapper.valueHasKey(candidate, key)); return index; }