- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 150 for MultiMap (0.06 sec)
-
guava-tests/test/com/google/common/collect/HashMultimapTest.java
HashMultimap<String, Integer> multimap = HashMultimap.create(); multimap.put("foo", 1); multimap.put("bar", 2); multimap.put("foo", 3); assertEquals(ImmutableSet.of(1, 3), multimap.get("foo")); assertEquals(2, multimap.expectedValuesPerKey); } public void testCreateFromMultimap() { HashMultimap<String, Integer> multimap = HashMultimap.create(); multimap.put("foo", 1); multimap.put("bar", 2);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 15 17:36:06 UTC 2024 - 4.3K bytes - Viewed (0) -
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/MultimapAsMapGetTester.java
assertContentsAnyOrder(multimap().get(k0()), v1(), v2()); assertTrue(multimap().containsKey(k0())); assertFalse(multimap().containsEntry(k0(), v0())); assertTrue(multimap().containsEntry(k0(), v2())); assertEquals(oldSize + 1, multimap().size()); } @CollectionSize.Require(absent = ZERO) @MapFeature.Require(SUPPORTS_REMOVE) public void testReflectsMultimapRemove() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/AbstractMultimapTester.java
assertFalse(multimap().isEmpty()); } else { assertNull(multimap().asMap().get(key)); } assertEquals(values.size(), multimap().get(key).size()); assertEquals(values.size() > 0, multimap().containsKey(key)); assertEquals(values.size() > 0, multimap().keySet().contains(key)); assertEquals(values.size() > 0, multimap().keys().contains(key));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableMultimap.java
* * @throws NullPointerException if any key or value in {@code multimap} is null */ public static <K, V> ImmutableMultimap<K, V> copyOf(Multimap<? extends K, ? extends V> multimap) { if (multimap instanceof ImmutableMultimap) { @SuppressWarnings("unchecked") // safe since multimap is not writable ImmutableMultimap<K, V> kvMultimap = (ImmutableMultimap<K, V>) multimap; if (!kvMultimap.isPartialView()) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 27.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MultimapBuilderTest.java
public void testTreeKeys() { ListMultimap<String, Integer> multimap = MultimapBuilder.treeKeys().arrayListValues().build(); assertTrue(multimap.keySet() instanceof SortedSet); assertTrue(multimap.asMap() instanceof SortedMap); } public void testTreeKeys_gwtCompatible() { ListMultimap<String, Integer> multimap =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 02 18:21:29 UTC 2024 - 5.2K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapTester.java
Set<Entry<K, Collection<V>>> asMapEntrySet = multimap().asMap().entrySet(); Entry<K, Collection<V>> asMapEntry0 = getOnlyElement(asMapEntrySet); assertTrue(multimap().put(k1(), v4())); assertTrue(asMapEntrySet.remove(asMapEntry0)); assertEquals(1, multimap().size()); assertContentsInOrder(multimap().keySet(), k1()); } @CollectionSize.Require(SEVERAL)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5.7K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSetMultimap.java
* * @throws NullPointerException if any key or value in {@code multimap} is null */ public static <K, V> ImmutableSetMultimap<K, V> copyOf( Multimap<? extends K, ? extends V> multimap) { return copyOf(multimap, null); } private static <K, V> ImmutableSetMultimap<K, V> copyOf( Multimap<? extends K, ? extends V> multimap, @CheckForNull Comparator<? super V> valueComparator) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 25.9K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/SortedSetMultimapAsMapTester.java
for (Collection<V> valueCollection : multimap().asMap().values()) { SortedSet<V> valueSet = (SortedSet<V>) valueCollection; assertEquals(multimap().valueComparator(), valueSet.comparator()); } } public void testAsMapGetImplementsSortedSet() { for (K key : multimap().keySet()) { SortedSet<V> valueSet = (SortedSet<V>) multimap().asMap().get(key);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 2.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MultimapsFilterEntriesAsMapTest.java
} @Override protected Map<String, Collection<Integer>> makeEmptyMap() { 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)