Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for computeIfAbsent (0.06 sec)

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

      @MapFeature.Require(SUPPORTS_PUT)
      public void testComputeIfAbsent_supportedAbsent() {
        assertEquals(
            "computeIfAbsent(notPresent, function) should return new value",
            v3(),
            getMap()
                .computeIfAbsent(
                    k3(),
                    k -> {
                      assertEquals(k3(), k);
                      return v3();
                    }));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Nov 14 23:40:07 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/testers/MapComputeIfAbsentTester.java

      @MapFeature.Require(SUPPORTS_PUT)
      public void testComputeIfAbsent_supportedAbsent() {
        assertEquals(
            "computeIfAbsent(notPresent, function) should return new value",
            v3(),
            getMap()
                .computeIfAbsent(
                    k3(),
                    k -> {
                      assertEquals(k3(), k);
                      return v3();
                    }));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/LocalCacheMapComputeTest.java

            n -> {
              cache.asMap().computeIfAbsent(key, k -> "value" + n);
            });
        assertEquals(1, cache.size());
      }
    
      public void testComputeIfAbsentEviction() {
        // b/80241237
    
        Cache<String, String> c = CacheBuilder.newBuilder().maximumSize(1).build();
    
        assertThat(c.asMap().computeIfAbsent("hash-1", k -> "")).isEqualTo("");
        assertThat(c.asMap().computeIfAbsent("hash-1", k -> "")).isEqualTo("");
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:49:18 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/entity/ParamMap.java

            // use original key
            return parent.replace(key, value);
        }
    
        @Override
        public V computeIfAbsent(final K key, final Function<? super K, ? extends V> mappingFunction) {
            // use original key
            return parent.computeIfAbsent(key, mappingFunction);
        }
    
        @Override
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  5. api/maven-api-core/src/main/java/org/apache/maven/api/services/Interpolator.java

         *
         * @see Function
         * @see Optional
         * @see HashMap#computeIfAbsent(Object, Function)
         */
        static UnaryOperator<String> memoize(UnaryOperator<String> callback) {
            Map<String, Optional<String>> cache = new HashMap<>();
            return s -> cache.computeIfAbsent(s, v -> Optional.ofNullable(callback.apply(v)))
                    .orElse(null);
        }
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Mon Jan 13 16:14:35 UTC 2025
    - 6.9K bytes
    - Viewed (0)
  6. api/maven-api-xml/src/main/java/org/apache/maven/api/xml/ImmutableCollections.java

                throw uoe();
            }
    
            @Override
            public V replace(K key, V value) {
                throw uoe();
            }
    
            @Override
            public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
                throw uoe();
            }
    
            @Override
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Mon Jul 07 11:47:42 UTC 2025
    - 7.8K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/smb2/rdma/disni/DisniMemoryRegion.java

            // or DiSNI-specific methods
    
            if (buffer.isDirect()) {
                // Assign a unique address to each buffer instance
                return bufferAddresses.computeIfAbsent(buffer, b -> addressCounter.getAndIncrement());
            } else {
                throw new IllegalArgumentException("Only direct ByteBuffers are supported for RDMA");
            }
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 05:11:12 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  8. api/maven-api-core/src/main/java/org/apache/maven/api/SessionData.java

         * @param supplier the supplier will compute the new value
         * @return the session data associated with the key
         */
        @Nullable
        <T> T computeIfAbsent(@Nonnull Key<T> key, @Nonnull Supplier<T> supplier);
    
        /**
         * Create a key using the given class as an identifier and as the type of the object.
         */
        static <T> Key<T> key(Class<T> clazz) {
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Wed Feb 28 23:31:09 UTC 2024
    - 4.7K bytes
    - Viewed (0)
Back to top