@Test public void testHashLongToIntNegative(){ long one32times = 0xFF_FF_FF_FFL; assertTrue(one32times > 2_000_000_000); assertEquals(-1, HashFunctions.hashLongToInt(one32times)); long singleOne = 0x80_00_00_00L; assertTrue(singleOne > 2_000_000_000); int hashed = HashFunctions.hashLongToInt(singleOne); assertTrue(hashed < -2_000_000_000); assertEquals(Integer.MIN_VALUE, hashed); }
public static int hashLongToInt(long x) { return (int) x; }
HashFunctions { public static int hashLongToInt(long x) { return (int) x; } }
HashFunctions { public static int hashLongToInt(long x) { return (int) x; }  }
HashFunctions { public static int hashLongToInt(long x) { return (int) x; }  static int nonUniformHash(int x); static int identityHash(int x); static int shiftedHash(int x); static int hashLongToInt(long x); static int hashLongToIntRevised(long x); static int hashStringSum(String x); static int hashStringSumRevised(String x); }
HashFunctions { public static int hashLongToInt(long x) { return (int) x; }  static int nonUniformHash(int x); static int identityHash(int x); static int shiftedHash(int x); static int hashLongToInt(long x); static int hashLongToIntRevised(long x); static int hashStringSum(String x); static int hashStringSumRevised(String x);  }