@Test public void testForLotsOfChange64() throws UnsupportedEncodingException { long h1 = MurmurHash.hash64A("abc".getBytes(Charsets.UTF_8), 0); long h2 = MurmurHash.hash64A("abc ".getBytes(Charsets.UTF_8), 0); int flipCount = Long.bitCount(h1 ^ h2); Assert.assertTrue("Small changes should result in lots of bit flips, only found " + flipCount, flipCount > 25); }
public static long hash64A(byte[] data, int seed) { return hash64A(ByteBuffer.wrap(data), seed); }
MurmurHash { public static long hash64A(byte[] data, int seed) { return hash64A(ByteBuffer.wrap(data), seed); } }
MurmurHash { public static long hash64A(byte[] data, int seed) { return hash64A(ByteBuffer.wrap(data), seed); } private  MurmurHash(); }
MurmurHash { public static long hash64A(byte[] data, int seed) { return hash64A(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 long hash64A(byte[] data, int seed) { return hash64A(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);  }