Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for putIfAbsent (0.13 sec)

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

        assertNull(map.put(one, two));
        assertSame(two, map.get(one));
        map.putAll(ImmutableMap.of(two, three));
        assertSame(three, map.get(two));
        assertSame(two, map.putIfAbsent(one, three));
        assertSame(two, map.get(one));
        assertNull(map.putIfAbsent(three, one));
        assertSame(one, map.get(three));
        assertSame(two, map.replace(one, three));
        assertSame(three, map.get(one));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/beans/factory/BeanDescFactory.java

     */
    package org.codelibs.core.beans.factory;
    
    import static org.codelibs.core.collection.CollectionsUtil.newConcurrentHashMap;
    import static org.codelibs.core.collection.CollectionsUtil.putIfAbsent;
    import static org.codelibs.core.misc.AssertionUtil.assertArgumentNotNull;
    
    import java.util.concurrent.ConcurrentMap;
    
    import org.codelibs.core.beans.BeanDesc;
    import org.codelibs.core.beans.impl.BeanDescImpl;
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/fess/entity/ParamMap.java

        @Override
        public void replaceAll(final BiFunction<? super K, ? super V, ? extends V> function) {
            parent.replaceAll(function);
        }
    
        @Override
        public V putIfAbsent(final K key, final V value) {
            return parent.putIfAbsent(key, value);
        }
    
        @Override
        public boolean remove(final Object key, final Object value) {
            if (parent.remove(key, value)) {
                return true;
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

            Entry<Object, Object> entry = warmed.get(i - WARMUP_MIN);
            Object newValue = new Object();
            assertSame(entry.getValue(), cache.asMap().putIfAbsent(entry.getKey(), newValue));
            Object newKey = new Object();
            assertNull(cache.asMap().putIfAbsent(newKey, entry.getValue()));
            // this getUnchecked() call shouldn't be a cache miss; verified below
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  5. fess-crawler/src/main/java/org/codelibs/fess/crawler/interval/impl/HostIntervalController.java

                final URI uri = new URI(url);
                final String host = uri.getHost();
                if (host == null) {
                    return;
                }
                final AtomicLong lastTime = lastTimes.putIfAbsent(host, new AtomicLong(SystemUtil.currentTimeMillis()));
                if (lastTime == null) {
                    return;
                }
                synchronized (lastTime) {
                    while (true) {
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Sun Jul 06 02:13:03 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  6. api/maven-api-xml/src/main/java/org/apache/maven/api/xml/ImmutableCollections.java

            @Override
            public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
                throw uoe();
            }
    
            @Override
            public V putIfAbsent(K key, V value) {
                throw uoe();
            }
    
            @Override
            public boolean remove(Object key, Object value) {
                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. guava/src/com/google/common/util/concurrent/AtomicLongMap.java

       * zero, associate it with {@code newValue}. Returns the previous value associated with {@code
       * key}, or zero if there was no mapping for {@code key}.
       */
      long putIfAbsent(K key, long newValue) {
        AtomicBoolean noValue = new AtomicBoolean(false);
        Long result =
            map.compute(
                key,
                (k, oldValue) -> {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

        assertEquals(Integer.valueOf(50), asMap.get(10));
        assertEquals(null, cache.getIfPresent(2));
        assertEquals(null, asMap.get(2));
    
        asMap.putIfAbsent(2, 20);
        asMap.putIfAbsent(10, 20);
    
        assertEquals(Integer.valueOf(20), cache.getIfPresent(2));
        assertEquals(Integer.valueOf(20), asMap.get(2));
        assertEquals(Integer.valueOf(50), cache.getIfPresent(10));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  9. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

          }
        }
      }
    
      public void fetch(HttpUrl url) throws IOException {
        // Skip hosts that we've visited many times.
        AtomicInteger hostnameCount = new AtomicInteger();
        AtomicInteger previous = hostnames.putIfAbsent(url.host(), hostnameCount);
        if (previous != null) hostnameCount = previous;
        if (hostnameCount.getAndIncrement() >= hostLimit) return;
    
        Request request = new Request.Builder()
            .url(url)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jul 23 00:58:06 UTC 2025
    - 5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

            Entry<Object, Object> entry = warmed.get(i - WARMUP_MIN);
            Object newValue = new Object();
            assertSame(entry.getValue(), cache.asMap().putIfAbsent(entry.getKey(), newValue));
            Object newKey = new Object();
            assertNull(cache.asMap().putIfAbsent(newKey, entry.getValue()));
            // this getUnchecked() call shouldn't be a cache miss; verified below
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 15.1K bytes
    - Viewed (0)
Back to top