- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for computeIfAbsent (0.14 sec)
-
guava/src/com/google/common/collect/Maps.java
} @Override @CheckForNull public V replace(K key, V value) { throw new UnsupportedOperationException(); } @Override public V computeIfAbsent( K key, java.util.function.Function<? super K, ? extends V> mappingFunction) { throw new UnsupportedOperationException(); } @Override @CheckForNull
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 167.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/LocalCacheTest.java
} }; Cache<Object, Object> cache = CacheBuilder.newBuilder().removalListener(removalListener).build(); cache.put("a", "b"); cache.asMap().computeIfAbsent("a", k -> "c"); assertTrue(notifications.toString(), notifications.isEmpty()); } public void testCopyEntry_computing() { final CountDownLatch startSignal = new CountDownLatch(1);
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
checkNotNull(key); checkNotNull(function); int hash = hash(key); return segmentFor(hash).compute(key, hash, function); } @Override public V computeIfAbsent(K key, Function<? super K, ? extends V> function) { checkNotNull(key); checkNotNull(function); return compute(key, (k, oldValue) -> (oldValue == null) ? function.apply(key) : oldValue); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 149.2K bytes - Viewed (0)