- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 150 for MultiMap (0.11 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapReplaceValuesTester.java
public void testReplaceValuesWithDuplicates() { int size = multimap().size(); List<V> oldValues = new ArrayList<>(multimap().get(k0())); List<V> values = asList(v0(), v3(), v0()); assertEquals(oldValues, new ArrayList<V>(multimap().replaceValues(k0(), values))); assertEquals(size - oldValues.size() + multimap().get(k0()).size(), multimap().size()); assertTrue(multimap().get(k0()).containsAll(values)); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapSizeTester.java
extends AbstractMultimapTester<K, V, Multimap<K, V>> { public void testSize() { int expectedSize = getNumElements(); Multimap<K, V> multimap = multimap(); assertEquals(expectedSize, multimap.size()); int size = 0; for (Entry<K, V> entry : multimap.entries()) { assertTrue(multimap.containsEntry(entry.getKey(), entry.getValue())); size++; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapPutIterableTester.java
NullPointerException.class, () -> multimap().putAll(k3(), Lists.newArrayList(v3(), null))); Collection<V> values = multimap().get(k3()); if (values.size() == 0) { expectUnchanged(); // Be extra thorough in case internal state was corrupted by the expected null. assertEquals(Lists.newArrayList(), Lists.newArrayList(values)); assertEquals(size, multimap().size()); } else {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 7.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapKeysTester.java
} public void testKeysElementSet() { assertEquals(multimap().keySet(), multimap().keys().elementSet()); } @MapFeature.Require(SUPPORTS_REMOVE) public void testKeysRemove() { int original = multimap().keys().remove(k0(), 1); assertEquals(max(original - 1, 0), multimap().get(k0()).size()); } @CollectionSize.Require(ONE)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.2K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapContainsEntryTester.java
@SuppressWarnings("JUnit4ClassUsedInJUnit3") public class MultimapContainsEntryTester<K, V> extends AbstractMultimapTester<K, V, Multimap<K, V>> { @CollectionSize.Require(absent = ZERO) public void testContainsEntryYes() { assertTrue(multimap().containsEntry(k0(), v0())); } public void testContainsEntryNo() { assertFalse(multimap().containsEntry(k3(), v3())); } public void testContainsEntryAgreesWithGet() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 19:10:20 UTC 2024 - 3.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/ListMultimapPutTester.java
public void testPutDuplicateValue() { List<Entry<K, V>> entries = copyToList(multimap().entries()); for (Entry<K, V> entry : entries) { resetContainer(); K k = entry.getKey(); V v = entry.getValue(); List<V> values = multimap().get(k); List<V> expectedValues = copyToList(values); assertTrue(multimap().put(k, v)); expectedValues.add(v); assertGet(k, expectedValues);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 2.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java
assertTrue(multimap.containsEntry("foo", 1)); assertFalse(multimap.containsEntry("cat", 1)); assertFalse(multimap.containsEntry("foo", 5)); assertFalse(multimap.entries().isEmpty()); assertEquals(3, multimap.size()); assertFalse(multimap.isEmpty()); assertEquals("{foo=[1, 3], bar=[2]}", multimap.toString()); } public void testMultimapWrites() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 23.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/MultimapsCollectionTest.java
static void populateMultimapForGet(Multimap<Integer, String> multimap, String[] elements) { multimap.put(2, "foo"); for (String element : elements) { multimap.put(3, element); } } static void populateMultimapForKeySet(Multimap<String, Integer> multimap, String[] elements) { for (String element : elements) { multimap.put(element, 2); multimap.put(element, 3); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 28.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapContainsKeyTester.java
@CollectionSize.Require(absent = ZERO) public void testContainsKeyYes() { assertTrue(multimap().containsKey(k0())); } public void testContainsKeyNo() { assertFalse(multimap().containsKey(k3())); } public void testContainsKeysFromKeySet() { for (K k : multimap().keySet()) { assertTrue(multimap().containsKey(k)); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 19:10:20 UTC 2024 - 3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapEqualsTester.java
.addEqualityGroup(getSubjectGenerator().create(targetEntries.toArray())) .testEquals(); } @CollectionSize.Require(absent = ZERO) @MapFeature.Require(ALLOWS_NULL_KEYS) public void testEqualsMultimapWithNullKey() { Multimap<K, V> original = multimap(); initMultimapWithNullKey(); Multimap<K, V> withNull = multimap(); new EqualsTester() .addEqualityGroup(original)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3.5K bytes - Viewed (0)