Home | History | Annotate | Download | only in hash

Lines Matching defs:HashCode

164   private void checkConsistentHashCorrectness(long hashCode) {
167 int b = Hashing.consistentHash(hashCode, shards);
210 checkSameResult(HashCode.fromLong(1), 1);
211 checkSameResult(HashCode.fromLong(0x9999999999999999L), 0x9999999999999999L);
212 checkSameResult(HashCode.fromInt(0x99999999), 0x0000000099999999L);
215 public void checkSameResult(HashCode hashCode, long equivLong) {
216 assertEquals(Hashing.consistentHash(equivLong, 5555), Hashing.consistentHash(hashCode, 5555));
243 Hashing.combineOrdered(Collections.<HashCode>emptySet());
251 Hashing.combineOrdered(ImmutableList.of(HashCode.fromInt(32), HashCode.fromLong(32L)));
258 HashCode hash31 = HashCode.fromInt(31);
259 HashCode hash32 = HashCode.fromInt(32);
261 assertEquals(HashCode.fromBytes(new byte[] { (byte) 0x80, 0, 0, 0 }),
263 assertEquals(HashCode.fromBytes(new byte[] { (byte) 0xa0, 0, 0, 0 }),
272 List<HashCode> hashCodes = Lists.newArrayList();
274 hashCodes.add(HashCode.fromLong(random.nextLong()));
276 HashCode hashCode1 = Hashing.combineOrdered(hashCodes);
278 HashCode hashCode2 = Hashing.combineOrdered(hashCodes);
285 Hashing.combineUnordered(Collections.<HashCode>emptySet());
293 Hashing.combineUnordered(ImmutableList.of(HashCode.fromInt(32), HashCode.fromLong(32L)));
300 HashCode hash31 = HashCode.fromInt(31);
301 HashCode hash32 = HashCode.fromInt(32);
303 assertEquals(HashCode.fromInt(64), Hashing.combineUnordered(ImmutableList.of(hash32, hash32)));
304 assertEquals(HashCode.fromInt(96),
313 List<HashCode> hashCodes = Lists.newArrayList();
315 hashCodes.add(HashCode.fromLong(random.nextLong()));
317 HashCode hashCode1 = Hashing.combineUnordered(hashCodes);
319 HashCode hashCode2 = Hashing.combineUnordered(hashCodes);
351 assertEquals(HashCode.fromBytes(combined),
364 HashCode expected = Hashing.md5().hashInt(input);
370 HashCode actual = hasher.hash();
448 .setDefault(HashCode.class, HashCode.fromLong(0));