- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 505 for hashCode (0.2 sec)
-
guava-tests/test/com/google/common/hash/HashingTest.java
Random random = new Random(7); List<HashCode> hashCodes = Lists.newArrayList(); for (int i = 0; i < 10; i++) { hashCodes.add(HashCode.fromLong(random.nextLong())); } HashCode hashCode1 = Hashing.combineOrdered(hashCodes); Collections.shuffle(hashCodes, random); HashCode hashCode2 = Hashing.combineOrdered(hashCodes); assertFalse(hashCode1.equals(hashCode2)); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 26.5K bytes - Viewed (0) -
guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java
} @Override public int hashCode() { return 0; } } static class SameIntegerInstance { private final Integer i; public SameIntegerInstance(Integer i) { this.i = checkNotNull(i); } @Override public int hashCode() { return i.hashCode(); } @Override
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Nov 16 15:12:31 GMT 2023 - 36.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashCodeTest.java
bytesB[4] = (byte) 0xef; HashCode hashCodeA = HashCode.fromBytes(bytesA); HashCode hashCodeB = HashCode.fromBytes(bytesB); // They aren't equal... assertFalse(hashCodeA.equals(hashCodeB)); // But they still have the same Object#hashCode() value. // Technically not a violation of the equals/hashCode contract, but...? assertEquals(hashCodeA.hashCode(), hashCodeB.hashCode()); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 13.1K bytes - Viewed (0) -
maven-compat/src/main/java/org/apache/maven/project/artifact/DefaultMavenMetadataCache.java
result = 31 * result + a.getGroupId().hashCode(); result = 31 * result + a.getArtifactId().hashCode(); result = 31 * result + a.getType().hashCode(); if (a.getVersion() != null) { result = 31 * result + a.getVersion().hashCode(); } result = 31 * result + (a.getClassifier() != null ? a.getClassifier().hashCode() : 0);
Java - Registered: Sun May 05 03:35:11 GMT 2024 - Last Modified: Thu Jun 15 14:24:56 GMT 2023 - 11.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java
} public void testHashCode() { assertEquals(control("foo", 1).hashCode(), entry("foo", 1).hashCode()); assertEquals(control("bar", 2).hashCode(), entry("bar", 2).hashCode()); } public void testHashCodeNull() { assertEquals(control(NE, 1).hashCode(), entry(NE, 1).hashCode()); } public void testNegativeCount() { try { entry("foo", -1); fail();
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Feb 21 10:16:44 GMT 2024 - 2.8K bytes - Viewed (0) -
guava/src/com/google/common/base/Objects.java
* public int hashCode() { * return Objects.hashCode(getX(), getY(), getZ()); * } * }</pre> * * <p><b>Warning:</b> When a single object is supplied, the returned hash code does not equal the * hash code of that object. * * <p><b>Java 7+ users:</b> This method should be treated as deprecated; use {@link * java.util.Objects#hash} instead. */
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 2.9K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularImmutableSet.java
private final transient int hashCode; // the same values as `elements` in hashed positions (plus nulls) @VisibleForTesting final transient @Nullable Object[] table; // 'and' with an int to get a valid table index. private final transient int mask; private final transient int size; RegularImmutableSet( @Nullable Object[] elements, int hashCode, @Nullable Object[] table, int mask, int size) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 22 21:19:52 GMT 2024 - 3.7K bytes - Viewed (0) -
guava/src/com/google/common/base/Functions.java
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 14.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/MacHashFunctionTest.java
Mac mac = Mac.getInstance("HmacMD5"); mac.init(MD5_KEY); mac.update(input.getBytes(UTF_8)); assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString()); assertEquals(knownOutput, Hashing.hmacMd5(MD5_KEY).hashString(input, UTF_8).toString());
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 13.8K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/Funnels.java
return this.charset.equals(funnel.charset); } return false; } @Override public int hashCode() { return StringCharsetFunnel.class.hashCode() ^ charset.hashCode(); } Object writeReplace() { return new SerializedForm(charset); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed May 25 20:32:46 GMT 2022 - 7.3K bytes - Viewed (0)