- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 40 for AsMap (0.09 sec)
-
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-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-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) -
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) -
android/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);Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 14.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/MultimapsTest.java
map.put("foo", 1); map.put("bar", 2); Map<String, Collection<Integer>> asMap = Multimaps.forMap(map).asMap(); assertEquals(singleton(1), asMap.get("foo")); assertThat(asMap.get("cow")).isNull(); assertTrue(asMap.containsKey("foo")); assertFalse(asMap.containsKey("cow")); Set<Entry<String, Collection<Integer>>> entries = asMap.entrySet(); assertFalse(entries.contains((Object) 4.5));
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 16:03:47 UTC 2025 - 38.9K bytes - Viewed (0) -
android/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); assertThat(cache.getIfPresent(3)).isNull(); assertThat(asMap.get(3)).isNull(); assertThat(cache.getIfPresent(2)).isEqualTo(79); assertThat(asMap.get(2)).isEqualTo(79); asMap.replace(10, 100, 50);Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 14.8K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AtomicLongMap.java
return map.values().stream().mapToLong(Long::longValue).sum(); } @LazyInit private transient @Nullable Map<K, Long> asMap; /** Returns a live, read-only view of the map backing this {@code AtomicLongMap}. */ public Map<K, Long> asMap() { Map<K, Long> result = asMap; return (result == null) ? asMap = createAsMap() : result; } private Map<K, Long> createAsMap() { return Collections.unmodifiableMap(map);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Fri Oct 10 23:13:45 UTC 2025 - 11.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheEvictionTest.java
// 1 won't be cached assertThat(cache.getUnchecked(1)).isEqualTo(1); assertThat(cache.asMap().keySet()).isEmpty(); CacheTesting.processPendingNotifications(cache); assertThat(removalListener.getCount()).isEqualTo(1); // 2 will be cached assertThat(cache.getUnchecked(2)).isEqualTo(2); assertThat(cache.asMap().keySet()).containsExactly(2); CacheTesting.processPendingNotifications(cache);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:19:59 UTC 2025 - 15.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java
assertThat(Iterators.size(cache.asMap().entrySet().iterator())).isEqualTo(1); assertThat(Iterators.size(cache.asMap().keySet().iterator())).isEqualTo(1); assertThat(Iterators.size(cache.asMap().values().iterator())).isEqualTo(1); CacheTesting.expireEntries((LoadingCache<?, ?>) cache, EXPIRING_TIME, ticker); for (int i = 0; i < 11; i++) { assertThat(cache.asMap().containsKey(KEY_PREFIX + i)).isFalse(); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 19.2K bytes - Viewed (0)