private int findKey(long key) {
        int hashcode = ((int)key & 0x7fffffff) % capacity;

        int p = indexer.first(hashcode);

        while (p != -1) {
            if (keys[p] == key) {
                return p;
            }
            p = indexer.next(p);
        }
        return -1;
    }
Finds the index for a given key.
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/LongKeyIndexer.java