@Test public void testForLotsOfChange32() throws UnsupportedEncodingException { int h1 = MurmurHash.hash("abc".getBytes(Charsets.UTF_8), 0); int h2 = MurmurHash.hash("abc ".getBytes(Charsets.UTF_8), 0); int flipCount = Integer.bitCount(h1 ^ h2); Assert.assertTrue("Small changes should result in lots of bit flips, only found " + flipCount, flipCount > 14); }
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);  }