- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 198 for asMap (0.14 sec)
-
guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapTester.java
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() { try { multimap().asMap().get(null); fail("Expected NullPointerException");
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Jan 09 20:10:38 GMT 2018 - 5.6K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/SetMultimapAsMapTester.java
public void testAsMapValuesImplementSet() { for (Collection<V> valueCollection : multimap().asMap().values()) { assertTrue(valueCollection instanceof Set); } } public void testAsMapGetImplementsSet() { for (K key : multimap().keySet()) { assertTrue(multimap().asMap().get(key) instanceof Set); } } @MapFeature.Require(SUPPORTS_REMOVE)
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 21 16:49:06 GMT 2024 - 3.9K bytes - Viewed (0) -
guava/src/com/google/common/collect/FilteredEntryMultimap.java
} @Override Map<K, Collection<V>> createAsMap() { return new AsMap(); } @Override Set<K> createKeySet() { return asMap().keySet(); } boolean removeEntriesIf(Predicate<? super Entry<K, Collection<V>>> predicate) { Iterator<Entry<K, Collection<V>>> entryIterator = unfiltered.asMap().entrySet().iterator(); boolean changed = false; while (entryIterator.hasNext()) {
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Wed Oct 06 00:47:57 GMT 2021 - 11.9K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java
try { multimap.asMap().get(presentKey).remove(sampleValue); fail("asMap().get().remove() succeeded on unmodifiable multimap"); } catch (UnsupportedOperationException expected) { } assertMultimapRemainsUnmodified(multimap, originalEntries); try { multimap.asMap().values().iterator().next().remove(sampleValue);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Feb 26 19:46:10 GMT 2024 - 15K 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");
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 6.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/TreeMultimapNaturalTest.java
public void testTreeMultimapAsMapSorted() { TreeMultimap<String, Integer> multimap = createPopulate(); SortedMap<String, Collection<Integer>> asMap = multimap.asMap(); assertEquals(Ordering.natural(), asMap.comparator()); assertEquals("foo", asMap.firstKey()); assertEquals("tree", asMap.lastKey()); Set<Integer> fooValues = ImmutableSet.of(1, 3, 7); Set<Integer> googleValues = ImmutableSet.of(2, 6);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Mar 07 18:34:03 GMT 2024 - 22.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java
ConcurrentMap<Integer, Integer> asMap = cache.asMap(); cache.put(10, 100); cache.put(2, 52); asMap.replace(2, 79); asMap.replace(3, 60); assertEquals(null, cache.getIfPresent(3)); assertEquals(null, asMap.get(3)); assertEquals(Integer.valueOf(79), cache.getIfPresent(2)); assertEquals(Integer.valueOf(79), asMap.get(2)); asMap.replace(10, 100, 50);
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Fri Aug 05 17:21:46 GMT 2022 - 15.1K 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(
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 11.5K 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()); } }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 6.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheManualTest.java
assertFalse(cache.asMap().containsKey(two)); assertFalse(cache.asMap().containsValue(one)); cache.put(two, one); assertSame(two, cache.getIfPresent(one)); stats = cache.stats(); assertEquals(3, stats.missCount()); assertEquals(0, stats.loadSuccessCount()); assertEquals(0, stats.loadExceptionCount()); assertEquals(2, stats.hitCount()); assertSame(two, cache.asMap().get(one));
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 5.4K bytes - Viewed (0)