- Sort Score
- Num 10 results
- Language All
Results 31 - 40 of 484 for hashCode (0.06 seconds)
-
guava/src/com/google/common/base/Predicates.java
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 26.6K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ForwardingMapEntry.java
/** * A sensible definition of {@link #hashCode()} in terms of {@link #getKey()} and {@link * #getValue()}. If you override either of these methods, you may wish to override {@link * #hashCode()} to forward to this implementation. * * @since 7.0 */ protected int standardHashCode() { K k = getKey(); V v = getValue(); return ((k == null) ? 0 : k.hashCode()) ^ ((v == null) ? 0 : v.hashCode()); }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Wed Aug 06 17:32:30 GMT 2025 - 4.3K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/AbstractMapEntry.java
&& Objects.equals(this.getValue(), that.getValue()); } return false; } @Override public int hashCode() { K k = getKey(); V v = getValue(); return ((k == null) ? 0 : k.hashCode()) ^ ((v == null) ? 0 : v.hashCode()); } /** Returns a string representation of the form {@code {key}={value}}. */ @Override public String toString() {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Jul 08 18:32:10 GMT 2025 - 1.9K bytes - Click Count (0) -
compat/maven-compat/src/test/java/org/apache/maven/artifact/repository/MavenArtifactRepositoryTest.java
MavenArtifactRepositorySubclass r3 = new MavenArtifactRepositorySubclass("bar"); assertTrue(r1.hashCode() == r2.hashCode()); assertFalse(r1.hashCode() == r3.hashCode()); assertTrue(r1.equals(r2), "Expected " + r1 + " to equal " + r2); assertTrue(r2.equals(r1), "Expected " + r2 + " to equal " + r1);
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Sep 17 10:01:14 GMT 2025 - 2K bytes - Click Count (0) -
android/guava/src/com/google/common/base/Objects.java
* Arrays#hashCode(Object[])}. Note that array arguments to this method, with the exception of a * single Object array, do not get any special handling; their hash codes are based on identity * and not contents. * * <p>This is useful for implementing {@link Object#hashCode()}. For example, in an object thatCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Jul 28 22:51:26 GMT 2025 - 3.1K bytes - Click Count (0) -
guava/src/com/google/common/base/Functions.java
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Wed Aug 06 17:32:30 GMT 2025 - 15.4K bytes - Click Count (0) -
guava-testlib/src/com/google/common/collect/testing/testers/ListHashCodeTester.java
for (E element : getOrderedElements()) { expectedHashCode = 31 * expectedHashCode + ((element == null) ? 0 : element.hashCode()); } assertEquals( "A List's hashCode() should be computed from those of its elements.", expectedHashCode, getList().hashCode()); } /** * Returns the {@link Method} instance for {@link #testHashCode()} so that list tests on
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 2K bytes - Click Count (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));
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 2.6K bytes - Click Count (0) -
android/guava-tests/benchmark/com/google/common/collect/IteratorBenchmark.java
for (int index = 0; index < size; index++) { sum += array[index].hashCode(); } } return sum; } @Benchmark int arrayIndexedLength(int reps) { int sum = 0; for (int i = 0; i < reps; i++) { for (int index = 0; index < array.length; index++) { sum += array[index].hashCode(); } } return sum; } @Benchmark
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 17:27:14 GMT 2025 - 3.5K bytes - Click Count (0) -
guava/src/com/google/common/collect/ImmutableEnumSet.java
} @Override boolean isHashCodeFast() { return true; } @LazyInit private transient int hashCode; @Override public int hashCode() { int result = hashCode; return (result == 0) ? hashCode = delegate.hashCode() : result; } @Override public String toString() { return delegate.toString(); } @Override
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 4.5K bytes - Click Count (0)