- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 132 for AsMap (0.02 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 3.8K 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 7K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/PopulatedCachesTest.java
Object newValue = new Object(); assertThat(cache.asMap().replace(entry.getKey(), newValue)) .isSameInstanceAs(entry.getValue()); assertThat(cache.asMap().replace(entry.getKey(), newValue, entry.getValue())).isTrue(); Object newKey = new Object(); assertThat(cache.asMap().replace(newKey, entry.getValue())).isNull(); assertThat(cache.asMap().replace(newKey, entry.getValue(), newValue)).isFalse();
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 15.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/ListMultimapAsMapTester.java
new EqualsTester().addEqualityGroup(expected, multimap().asMap().entrySet()).testEquals(); } @CollectionSize.Require(SEVERAL) @MapFeature.Require(SUPPORTS_REMOVE) /* * ListMultimap.asMap essentially returns a Map<K, List<V>>; we just can't declare it that way. * Thus, calls like asMap().values().remove(someList) are safe because they are comparing a list * to a collection of other lists.
Registered: Fri Dec 26 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/ListMultimapAsMapTester.java
new EqualsTester().addEqualityGroup(expected, multimap().asMap().entrySet()).testEquals(); } @CollectionSize.Require(SEVERAL) @MapFeature.Require(SUPPORTS_REMOVE) /* * ListMultimap.asMap essentially returns a Map<K, List<V>>; we just can't declare it that way. * Thus, calls like asMap().values().remove(someList) are safe because they are comparing a list * to a collection of other lists.
Registered: Fri Dec 26 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/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 Dec 26 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 5.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java
Object newValue = new Object(); assertThat(cache.asMap().replace(entry.getKey(), newValue)) .isSameInstanceAs(entry.getValue()); assertThat(cache.asMap().replace(entry.getKey(), newValue, entry.getValue())).isTrue(); Object newKey = new Object(); assertThat(cache.asMap().replace(newKey, entry.getValue())).isNull(); assertThat(cache.asMap().replace(newKey, entry.getValue(), newValue)).isFalse();
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 15.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheReferencesTest.java
cache.invalidate(key1); assertThat(cache.asMap().containsKey(key1)).isFalse(); assertThat(cache.asMap().containsKey(key2)).isTrue(); assertThat(cache.size()).isEqualTo(1); assertThat(cache.asMap().keySet()).isEqualTo(ImmutableSet.of(key2)); assertThat(cache.asMap().values()).contains(value2); assertThat(cache.asMap().entrySet()).containsExactly(immutableEntry(key2, value2)); } }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 5.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/EmptyCachesTest.java
Set<Object> keys = cache.asMap().keySet(); assertThrows(NullPointerException.class, () -> keys.toArray((Object[]) null)); checkEmpty(cache); } } public void testKeySet_addNotSupported() { for (LoadingCache<Object, Object> cache : caches()) { assertThrows(UnsupportedOperationException.class, () -> cache.asMap().keySet().add(1)); assertThrows(
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 11.9K bytes - Viewed (0)