- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 508 for hashCode (0.73 sec)
-
android/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()); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 13.1K bytes - Viewed (0) -
maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java
hash = hash * 31 + (plugin.isExtensions() ? 1 : 0); for (Dependency dependency : plugin.getDependencies()) { hash = hash * 31 + Objects.hashCode(dependency.getGroupId()); hash = hash * 31 + Objects.hashCode(dependency.getArtifactId()); hash = hash * 31 + Objects.hashCode(dependency.getVersion()); hash = hash * 31 + Objects.hashCode(dependency.getType());
Registered: Wed Jun 12 09:55:16 UTC 2024 - Last Modified: Wed Sep 06 08:39:32 UTC 2023 - 4.5K bytes - Viewed (0) -
analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/contracts/description/KtEffects.kt
public val occurrencesRange: EventOccurrencesRange get() = withValidityAssertion { backingOccurrencesRange } override fun hashCode(): Int = Objects.hashCode(backingValueParameterReference, backingOccurrencesRange) override fun equals(other: Any?): Boolean { return this === other || other is KaContractCallsInPlaceContractEffectDeclaration &&
Registered: Wed Jun 12 09:53:16 UTC 2024 - Last Modified: Wed May 22 06:28:34 UTC 2024 - 4.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/ObjectsTest.java
int h1 = Objects.hashCode(1, "two", 3.0); int h2 = Objects.hashCode(Integer.valueOf(1), new String("two"), Double.valueOf(3.0)); // repeatable assertEquals(h1, h2); // These don't strictly need to be true, but they're nice properties. assertTrue(Objects.hashCode(1, 2, null) != Objects.hashCode(1, 2)); assertTrue(Objects.hashCode(1, 2, null) != Objects.hashCode(1, null, 2));
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 21 18:32:41 UTC 2024 - 2.3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/SetHashCodeTester.java
int expectedHashCode = 0; for (E element : getSampleElements()) { expectedHashCode += ((element == null) ? 0 : element.hashCode()); } assertEquals( "A Set's hashCode() should be the sum of those of its elements.", expectedHashCode, getSet().hashCode()); } @CollectionSize.Require(absent = CollectionSize.ZERO) @CollectionFeature.Require(ALLOWS_NULL_VALUES)
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 21 16:49:06 UTC 2024 - 3K 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
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jun 11 16:13:05 UTC 2024 - 36.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/RegularImmutableMultiset.java
int index = 0; int hashCode = 0; long size = 0; for (Entry<? extends E> entryWithWildcard : entries) { @SuppressWarnings("unchecked") // safe because we only read from it Entry<E> entry = (Entry<E>) entryWithWildcard; E element = checkNotNull(entry.getElement()); int count = entry.getCount(); int hash = element.hashCode(); int bucket = Hashing.smear(hash) & mask;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 6.9K bytes - Viewed (0) -
guava/src/com/google/common/hash/Hashing.java
for (HashCode hashCode : hashCodes) { byte[] nextBytes = hashCode.asBytes(); checkArgument( nextBytes.length == resultBytes.length, "All hashcodes must have the same bit length."); for (int i = 0; i < nextBytes.length; i++) { resultBytes[i] = (byte) (resultBytes[i] * 37 ^ nextBytes[i]); } } return HashCode.fromBytesNoCopy(resultBytes); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Apr 09 00:37:15 UTC 2024 - 32.3K bytes - Viewed (0) -
maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java
int hash = 17; hash = hash * 31 + groupId.hashCode(); hash = hash * 31 + artifactId.hashCode(); hash = hash * 31 + version.hashCode(); hash = hash * 31 + hash(workspace); hash = hash * 31 + localRepo.hashCode(); hash = hash * 31 + RepositoryUtils.repositoriesHashCode(repositories); this.hashCode = hash; } @Override
Registered: Wed Jun 12 09:55:16 UTC 2024 - Last Modified: Wed Feb 28 23:31:49 UTC 2024 - 6K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/Hashing.java
for (HashCode hashCode : hashCodes) { byte[] nextBytes = hashCode.asBytes(); checkArgument( nextBytes.length == resultBytes.length, "All hashcodes must have the same bit length."); for (int i = 0; i < nextBytes.length; i++) { resultBytes[i] = (byte) (resultBytes[i] * 37 ^ nextBytes[i]); } } return HashCode.fromBytesNoCopy(resultBytes); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Apr 09 00:37:15 UTC 2024 - 29.2K bytes - Viewed (0)