Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for computeIfPresent (0.05 sec)

  1. 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();
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Nov 14 23:40:07 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  2. 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();
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 6.1K bytes
    - Viewed (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);
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 7K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/entity/ParamMap.java

            // use original key
            return parent.computeIfAbsent(key, mappingFunction);
        }
    
        @Override
        public V computeIfPresent(final K key, final BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
            // use original key
            return parent.computeIfPresent(key, remappingFunction);
        }
    
        @Override
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 5.8K bytes
    - Viewed (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,
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Aug 08 15:11:10 UTC 2025
    - 56.9K bytes
    - Viewed (0)
  6. 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));
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 22:56:33 UTC 2025
    - 65K bytes
    - Viewed (0)
  7. 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(
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Nov 17 22:50:48 UTC 2025
    - 163.5K bytes
    - Viewed (0)
  8. 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);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Sep 11 19:35:11 UTC 2025
    - 148.9K bytes
    - Viewed (0)
Back to top