@Override
    public boolean equals(Object o) {
        if (! (o instanceof Hashlet) ) return false;
        Hashlet<?, ?> rhs = (Hashlet<?, ?>) o;
        if (used != rhs.used) return false;
        for (int i = 0; i < used; i++) {
            int bi = rhs.getIndexOfKey(key(i));
            if (bi == -1) return false;
            Object a = value(i);
            Object b = rhs.value(bi);
            boolean equal = (a == null) ? b == null : a.equals(b);
            if ( !equal ) return false;
        }
        return true;
    }
Finds the index where the key,value pair is stored.
@param key to look for
@return the index where the key is found or -1 if it is not found
vespajlib/src/main/java/com/yahoo/collections/Hashlet.java