Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 7 of 7 for computeIfPresent (0.09 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. android/guava-testlib/src/com/google/common/collect/testing/testers/MapComputeIfPresentTester.java

      @MapFeature.Require(SUPPORTS_PUT)
      public void testComputeIfPresent_supportedAbsent() {
        assertNull(
            "computeIfPresent(notPresent, function) should return null",
            getMap()
                .computeIfPresent(
                    k3(),
                    (k, v) -> {
                      throw new AssertionFailedError();
                    }));
        expectUnchanged();
      }
    
    Created: 2026-04-03 12:43
    - Last Modified: 2024-10-31 14:51
    - 6.1K bytes
    - Click Count (0)
  2. guava-testlib/src/com/google/common/collect/testing/testers/MapComputeIfPresentTester.java

      @MapFeature.Require(SUPPORTS_PUT)
      public void testComputeIfPresent_supportedAbsent() {
        assertNull(
            "computeIfPresent(notPresent, function) should return null",
            getMap()
                .computeIfPresent(
                    k3(),
                    (k, v) -> {
                      throw new AssertionFailedError();
                    }));
        expectUnchanged();
      }
    
    Created: 2026-04-03 12:43
    - Last Modified: 2024-11-14 23:40
    - 6.1K bytes
    - Click Count (0)
  3. 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: 2026-04-03 12:43
    - Last Modified: 2026-03-18 18:06
    - 6.4K bytes
    - Click Count (0)
  4. api/maven-api-xml/src/main/java/org/apache/maven/api/xml/ImmutableCollections.java

            }
    
            @Override
            public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
                throw uoe();
            }
    
            @Override
            public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
                throw uoe();
            }
    
            @Override
    Created: 2026-04-05 03:35
    - Last Modified: 2025-07-07 11:47
    - 7.8K bytes
    - Click Count (0)
  5. guava/src/com/google/common/collect/Synchronized.java

        @SuppressWarnings("nullness") // TODO: b/423853632 - Remove after checker is fixed.
        @Override
        public @Nullable V computeIfPresent(
            K key, BiFunction<? super K, ? super @NonNull V, ? extends @Nullable V> remappingFunction) {
          synchronized (mutex) {
            return delegate().computeIfPresent(key, remappingFunction);
          }
        }
    
        @Override
        public @Nullable V compute(
            K key,
    Created: 2026-04-03 12:43
    - Last Modified: 2025-08-08 15:11
    - 56.9K bytes
    - Click Count (0)
  6. 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: 2026-04-03 12:43
    - Last Modified: 2026-04-01 17:27
    - 163.4K bytes
    - Click Count (0)
  7. 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: 2026-04-03 12:43
    - Last Modified: 2026-04-01 17:27
    - 148.9K bytes
    - Click Count (0)
Back to Top