- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for ExpectedHashCode (0.1 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/testers/SetHashCodeTester.java
public class SetHashCodeTester<E> extends AbstractSetTester<E> { public void testHashCode() { 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()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/MapHashCodeTester.java
public class MapHashCodeTester<K, V> extends AbstractMapTester<K, V> { public void testHashCode() { int expectedHashCode = 0; for (Entry<K, V> entry : getSampleEntries()) { expectedHashCode += hash(entry); } assertEquals( "A Map's hashCode() should be the sum of those of its entries.", expectedHashCode, getMap().hashCode()); } @CollectionSize.Require(absent = CollectionSize.ZERO)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/SetHashCodeTester.java
public class SetHashCodeTester<E> extends AbstractSetTester<E> { public void testHashCode() { 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()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/ListHashCodeTester.java
public void testHashCode() { int expectedHashCode = 1; 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()); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 2K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/MapHashCodeTester.java
public class MapHashCodeTester<K, V> extends AbstractMapTester<K, V> { public void testHashCode() { int expectedHashCode = 0; for (Entry<K, V> entry : getSampleEntries()) { expectedHashCode += hash(entry); } assertEquals( "A Map's hashCode() should be the sum of those of its entries.", expectedHashCode, getMap().hashCode()); } @CollectionSize.Require(absent = CollectionSize.ZERO)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/ListHashCodeTester.java
public void testHashCode() { int expectedHashCode = 1; 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()); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 2K bytes - Viewed (0)