- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 179 for Multimap (0.24 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/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-tests/test/com/google/common/collect/MultimapsTest.java
multimap.put("bar", 5); multimap.put("bar", -1); multimap.put(nullKey, nullValue); multimap.put("foo", nullValue); multimap.put(nullKey, 5); multimap.put("foo", 2); if (permitsDuplicates) { assertEquals(9, multimap.size()); } else { assertEquals(8, multimap.size()); } Multimap<@Nullable String, @Nullable Integer> unmodifiable;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 38.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Multimaps.java
Multimap<K, V> synchronizedMultimap(Multimap<K, V> multimap) { return Synchronized.multimap(multimap, null); } /** * Returns an unmodifiable view of the specified multimap. Query operations on the returned * multimap "read through" to the specified multimap, and attempts to modify the returned * multimap, either directly or through the multimap's views, result in an {@code
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 21:21:17 UTC 2024 - 86.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/MultimapsFilterEntriesAsMapTest.java
Multimap<String, Integer> multimap = createMultimap(); return multimap.asMap(); } @Override protected Map<String, Collection<Integer>> makePopulatedMap() { Multimap<String, Integer> multimap = createMultimap(); populate(multimap); return multimap.asMap(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2K bytes - Viewed (0)