- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for getOrDefault (0.06 sec)
-
guava/src/com/google/common/collect/Maps.java
return backingSet().contains(key); } @Override @CheckForNull public V get(@CheckForNull Object key) { return getOrDefault(key, null); } @Override @CheckForNull public V getOrDefault(@CheckForNull Object key, @CheckForNull V defaultValue) { if (Collections2.safeContains(backingSet(), key)) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 167.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/LocalCacheTest.java
LocalCache<Object, Object> map = makeLocalCache(createCacheBuilder().concurrencyLevel(1).initialCapacity(1)); map.put(1, 1); assertEquals(1, map.getOrDefault(1, 2)); assertEquals(2, map.getOrDefault(2, 2)); } public void testPutCausesExpansion() { for (int count = 1; count <= 100; count++) { LocalCache<Object, Object> map =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 110.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/LocalCacheTest.java
LocalCache<Object, Object> map = makeLocalCache(createCacheBuilder().concurrencyLevel(1).initialCapacity(1)); map.put(1, 1); assertEquals(1, map.getOrDefault(1, 2)); assertEquals(2, map.getOrDefault(2, 2)); } public void testPutCausesExpansion() { for (int count = 1; count <= 100; count++) { LocalCache<Object, Object> map =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 112.3K bytes - Viewed (0) -
guava/src/com/google/common/cache/LocalCache.java
globalStatsCounter.recordMisses(1); } else { globalStatsCounter.recordHits(1); } return value; } @Override @CheckForNull public V getOrDefault(@CheckForNull Object key, @CheckForNull V defaultValue) { V result = get(key); return (result != null) ? result : defaultValue; } V getOrLoad(K key) throws ExecutionException {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 149.2K bytes - Viewed (0)