@Test public void testChangingSeed() { byte[] key = {0x4E, (byte) 0xE3, (byte) 0x91, 0x00, 0x10, (byte) 0x8F, (byte) 0xFF}; int[] expected = {0xeef8be32, 0x8109dec6, 0x9aaf4192, 0xc1bcaf1c, 0x821d2ce4, 0xd45ed1df, 0x6c0357a7, 0x21d4e845, 0xfa97db50, 0x2f1985c8, 0x5d69782a, 0x0d6e4b85, 0xe7d9cf6b, 0x337e6b49, 0xe1606944, 0xccc18ae8}; for (int i = 0; i < expected.length; i++) { int expectedHash = expected[i]; int hash = MurmurHash.hash(key, i); 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);  }