boolean (final int key, final int value) { checkNotNoValue("key", key); checkNotNoValue("value", value); final int capacity = capacity(); final int startIndex = Math.abs(key % capacity); for (int probe = 0; probe < capacity; probe++) { final int slotIndex = (startIndex + probe) % capacity; final int slotKey = table[slotIndex * 2]; final int slotValue = table[slotIndex * 2 + 1]; if (slotKey == key && slotValue == value) { return true; } else if (slotKey == NO_VALUE && slotValue == NO_VALUE) { //free slot -> end of probing sequence, no (key, value) found: break; } } return false; }