Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for computeIfPresent (0.22 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();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 5.8K bytes
    - Viewed (0)
  2. 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);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  3. 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
    Java
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/MapsTest.java

        try {
          unmod.computeIfAbsent(3, (k) -> k + "three");
          fail("UnsupportedOperationException expected");
        } catch (UnsupportedOperationException expected) {
        }
        try {
          unmod.computeIfPresent(4, (k, v) -> v);
          fail("UnsupportedOperationException expected");
        } catch (UnsupportedOperationException expected) {
        }
        try {
          unmod.compute(4, (k, v) -> v);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 16:06:01 GMT 2024
    - 67.2K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/ImmutableMap.java

       * @deprecated Unsupported operation.
       */
      @Deprecated
      @Override
      @DoNotCall("Always throws UnsupportedOperationException")
      @CheckForNull
      public final V computeIfPresent(
          K key, BiFunction<? super K, ? super V, ? extends @Nullable V> remappingFunction) {
        throw new UnsupportedOperationException();
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 44.1K bytes
    - Viewed (0)
  6. guava/src/com/google/common/cache/LocalCache.java

        checkNotNull(key);
        checkNotNull(function);
        return compute(key, (k, oldValue) -> (oldValue == null) ? function.apply(key) : oldValue);
      }
    
      @Override
      @CheckForNull
      public V computeIfPresent(
          K key, BiFunction<? super K, ? super V, ? extends @Nullable V> function) {
        checkNotNull(key);
        checkNotNull(function);
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
Back to top