fun put(key: Long) { if (key == FREE_KEY) { m_hasFreeKey = true return } var ptr = (Tools.phiMix(key) and m_mask) as Int var e: Long = m_data.get(ptr) if (e == FREE_KEY) { m_data.get(ptr) = key if (m_size >= m_threshold) { rehash(m_data.length * 2) } else { ++m_size } return } else if (e == key) { return } while (true) { ptr = (ptr + 1 and m_mask) e = m_data.get(ptr) if (e == FREE_KEY) { m_data.get(ptr) = key if (m_size >= m_threshold) { rehash(m_data.length * 2) } else { ++m_size } return } else if (e == key) { return }   }
Add a single element to the map