public int get()

in graphjet-core/src/main/java/com/twitter/graphjet/hashing/ArrayBasedLongToInternalIntFixedLengthBiMap.java [146:165]


  public int get(long key) {
    long primaryHash = primaryHashFunction(key);
    int hashedValue = (int) (primaryHash & bitMask);
    long currentKey = array.get(hashedValue);
    if (currentKey == defaultGetReturnValue) {
      return defaultGetReturnValue;
    } else if (currentKey == key) {
      return hashedValue;
    }
    int secondaryHash = secondaryHashFunction(key, bitMask);
    do {
      hashedValue = (int) (((long) hashedValue + secondaryHash) & bitMask);
      currentKey = array.get(hashedValue);
    } while ((currentKey != defaultGetReturnValue) && (currentKey != key));
    if (currentKey == defaultGetReturnValue) {
      return defaultGetReturnValue;
    } else {
      return hashedValue;
    }
  }