- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 69 for AsMap (0.01 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapSizeTester.java
assertTrue(multimap.containsEntry(entry.getKey(), entry.getValue())); size++; } assertEquals(expectedSize, size); int size2 = 0; for (Entry<K, Collection<V>> entry2 : multimap.asMap().entrySet()) { size2 += entry2.getValue().size(); } assertEquals(expectedSize, size2); } @CollectionSize.Require(ZERO) public void testIsEmptyYes() { assertTrue(multimap().isEmpty());
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 3.8K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/SetMultimapAsMapTester.java
new EqualsTester().addEqualityGroup(expected, multimap().asMap().entrySet()).testEquals(); } @CollectionSize.Require(SEVERAL) @MapFeature.Require(SUPPORTS_REMOVE) /* * SetMultimap.asMap essentially returns a Map<K, Set<V>>; we just can't declare it that way. * Thus, calls like asMap().values().remove(someSet) are safe because they are comparing a set to * a collection of other sets. */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 4.3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapGetTester.java
Collection<V> result = multimap().asMap().get(k0()); assertTrue(result.remove(v0())); assertFalse(multimap().containsEntry(k0(), v0())); assertEquals(2, multimap().size()); } @CollectionSize.Require(absent = ZERO) @MapFeature.Require(SUPPORTS_REMOVE) public void testPropagatesRemoveLastElementToMultimap() { Collection<V> result = multimap().asMap().get(k0()); assertTrue(result.remove(v0()));
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 5.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/AbstractMultimap.java
return Maps.valueIterator(entries().iterator()); } @LazyInit private transient @Nullable Map<K, Collection<V>> asMap; @Override public Map<K, Collection<V>> asMap() { Map<K, Collection<V>> result = asMap; return (result == null) ? asMap = createAsMap() : result; } abstract Map<K, Collection<V>> createAsMap(); // Comparison and hashing @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 6.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheReferencesTest.java
cache.invalidate(key1); assertFalse(cache.asMap().containsKey(key1)); assertTrue(cache.asMap().containsKey(key2)); assertEquals(1, cache.size()); assertEquals(ImmutableSet.of(key2), cache.asMap().keySet()); assertThat(cache.asMap().values()).contains(value2); assertEquals(ImmutableSet.of(immutableEntry(key2, value2)), cache.asMap().entrySet()); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 20:58:01 UTC 2025 - 5.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/SetMultimapAsMapTester.java
new EqualsTester().addEqualityGroup(expected, multimap().asMap().entrySet()).testEquals(); } @CollectionSize.Require(SEVERAL) @MapFeature.Require(SUPPORTS_REMOVE) /* * SetMultimap.asMap essentially returns a Map<K, Set<V>>; we just can't declare it that way. * Thus, calls like asMap().values().remove(someSet) are safe because they are comparing a set to * a collection of other sets. */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 4.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapGetTester.java
Collection<V> result = multimap().asMap().get(k0()); assertTrue(result.remove(v0())); assertFalse(multimap().containsEntry(k0(), v0())); assertEquals(2, multimap().size()); } @CollectionSize.Require(absent = ZERO) @MapFeature.Require(SUPPORTS_REMOVE) public void testPropagatesRemoveLastElementToMultimap() { Collection<V> result = multimap().asMap().get(k0()); assertTrue(result.remove(v0()));
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 5.1K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapTester.java
public void testAsMapGetNullKeyPresent() { initMultimapWithNullKey(); assertContentsAnyOrder(multimap().asMap().get(null), getValueForNullKey()); } @MapFeature.Require(ALLOWS_NULL_KEY_QUERIES) public void testAsMapGetNullKeyAbsent() { assertNull(multimap().asMap().get(null)); } @MapFeature.Require(absent = ALLOWS_NULL_KEY_QUERIES) public void testAsMapGetNullKeyUnsupported() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 5.8K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultimapClearTester.java
Collection<V> collection = multimap().asMap().get(key); if (collection != null) { multimap().clear(); assertEmpty(collection); } } } @MapFeature.Require(SUPPORTS_REMOVE) public void testClearPropagatesToAsMap() { Map<K, Collection<V>> asMap = multimap().asMap(); multimap().clear(); assertEmpty(asMap); } @MapFeature.Require(SUPPORTS_REMOVE)
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Feb 12 21:10:54 UTC 2025 - 4.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/LocalCacheMapComputeTest.java
assertThat(c.asMap().computeIfAbsent("hash-1", k -> "")).isEqualTo(""); assertThat(c.size()).isEqualTo(1); assertThat(c.asMap().computeIfAbsent("hash-2", k -> "")).isEqualTo(""); } public void testComputeEviction() { // b/80241237 Cache<String, String> c = CacheBuilder.newBuilder().maximumSize(1).build(); assertThat(c.asMap().compute("hash-1", (k, v) -> "a")).isEqualTo("a");
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Feb 12 03:49:18 UTC 2025 - 6.4K bytes - Viewed (0)