@Test public void testChangingKey() { byte[] key = new byte[133]; int[] expected = {0xd743ae0b, 0xf1b461c6, 0xa45a6ceb, 0xdb15e003, 0x877721a4, 0xc30465f1, 0xfb658ba4, 0x1adf93b2, 0xe40a7931, 0x3da52db0, 0xbf523511, 0x1efaf273, 0xe628c1dd, 0x9a0344df, 0x901c99fc, 0x5ae1aa44}; for (int i = 0; i < 16; i++) { setKey(key, i); int expectedHash = expected[i]; int hash = MurmurHash.hash(key, 0x1234ABCD); Assert.assertEquals("i = " + i, expectedHash, hash); } }
public static int hash(byte[] data, int seed) { return hash(ByteBuffer.wrap(data), seed); }
MurmurHash { public static int hash(byte[] data, int seed) { return hash(ByteBuffer.wrap(data), seed); } }
MurmurHash { public static int hash(byte[] data, int seed) { return hash(ByteBuffer.wrap(data), seed); } private  MurmurHash(); }
MurmurHash { public static int hash(byte[] data, int seed) { return hash(ByteBuffer.wrap(data), seed); } private  MurmurHash(); static int hash(byte[] data, int seed); static int hash(byte[] data, int offset, int length, int seed); static int hash(ByteBuffer buf, int seed); static long hash64A(byte[] data, int seed); static long hash64A(byte[] data, int offset, int length, int seed); static long hash64A(ByteBuffer buf, int seed); }
MurmurHash { public static int hash(byte[] data, int seed) { return hash(ByteBuffer.wrap(data), seed); } private  MurmurHash(); static int hash(byte[] data, int seed); static int hash(byte[] data, int offset, int length, int seed); static int hash(ByteBuffer buf, int seed); static long hash64A(byte[] data, int seed); static long hash64A(byte[] data, int offset, int length, int seed); static long hash64A(ByteBuffer buf, int seed);  }