Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 4 of 4 for computeIfPresent (0.14 seconds)

  1. guava-tests/test/com/google/common/cache/LocalCacheMapComputeTest.java

                .build();
        cache.put(1, 2);
    
        // explicitly remove the existing value
        cache.asMap().computeIfPresent(1, (key, value) -> null);
        assertThat(notifications).hasSize(1);
        CacheTesting.checkEmpty(cache);
    
        // ensure no zombie entry remains
        cache.asMap().computeIfPresent(1, (key, value) -> null);
        assertThat(notifications).hasSize(1);
        CacheTesting.checkEmpty(cache);
      }
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Sep 30 22:03:28 GMT 2025
    - 7K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/collect/MapsTest.java

        assertThrows(
            UnsupportedOperationException.class, () -> unmod.computeIfAbsent(3, k -> k + "three"));
        assertThrows(UnsupportedOperationException.class, () -> unmod.computeIfPresent(4, (k, v) -> v));
        assertThrows(UnsupportedOperationException.class, () -> unmod.compute(4, (k, v) -> v));
        assertThrows(UnsupportedOperationException.class, () -> unmod.merge(4, "four", (k, v) -> v));
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Dec 11 22:56:33 GMT 2025
    - 65K bytes
    - Click Count (0)
  3. guava/src/com/google/common/collect/Maps.java

            K key, java.util.function.Function<? super K, ? extends V> mappingFunction) {
          throw new UnsupportedOperationException();
        }
    
        @Override
        public @Nullable V computeIfPresent(
            K key, BiFunction<? super K, ? super @NonNull V, ? extends @Nullable V> remappingFunction) {
          throw new UnsupportedOperationException();
        }
    
        @Override
        public @Nullable V compute(
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Nov 17 22:50:48 GMT 2025
    - 163.5K bytes
    - Click Count (0)
  4. guava/src/com/google/common/cache/LocalCache.java

        checkNotNull(key);
        checkNotNull(function);
        return compute(key, (k, oldValue) -> (oldValue == null) ? function.apply(key) : oldValue);
      }
    
      @Override
      public @Nullable V computeIfPresent(
          K key, BiFunction<? super K, ? super V, ? extends @Nullable V> function) {
        checkNotNull(key);
        checkNotNull(function);
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Sep 11 19:35:11 GMT 2025
    - 148.9K bytes
    - Click Count (0)
Back to Top