Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 54 for putIfAbsent (0.4 sec)

  1. maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/Graph.java

                Map<String, DfsState> stateMap,
                LinkedList<String> cycle) {
            if (children != null) {
                for (String v : children) {
                    DfsState state = stateMap.putIfAbsent(v, DfsState.VISITING);
                    if (state == null) {
                        cycle.addLast(v);
                        List<String> ret = visitCycle(graph, graph.get(v), stateMap, cycle);
                        if (ret != null) {
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  2. 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;
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  3. 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));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 12.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/cache/LoadingCache.java

       *
       * <p>Caches loaded by a {@link CacheLoader} will call {@link CacheLoader#load} to load new values
       * into the cache. Newly loaded values are added to the cache using {@code
       * Cache.asMap().putIfAbsent} after loading has completed; if another value was associated with
       * {@code key} while the new value was loading then a removal notification will be sent for the
       * new value.
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Sat Aug 06 17:12:03 GMT 2022
    - 8.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/cache/LoadingCache.java

       *
       * <p>Caches loaded by a {@link CacheLoader} will call {@link CacheLoader#load} to load new values
       * into the cache. Newly loaded values are added to the cache using {@code
       * Cache.asMap().putIfAbsent} after loading has completed; if another value was associated with
       * {@code key} while the new value was loading then a removal notification will be sent for the
       * new value.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sat Aug 06 17:12:03 GMT 2022
    - 8.3K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java

          }
          checkArgument(occurrences > 0, "Invalid occurrences: %s", occurrences);
    
          while (true) {
            int current = count(element);
            if (current == 0) {
              if (countMap.putIfAbsent(element, occurrences) == null) {
                return 0;
              }
            } else {
              checkArgument(
                  occurrences <= Integer.MAX_VALUE - current,
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed May 09 15:17:25 GMT 2018
    - 16.6K bytes
    - Viewed (0)
  7. 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));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 15K bytes
    - Viewed (0)
  8. 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.incrementAndGet() > 100) return;
    
        Request request = new Request.Builder()
            .url(url)
            .build();
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Interners.java

                E result = (E) canonical;
                return result;
              }
            }
    
            // didn't see it, trying to put it instead...
            Dummy sneaky = map.putIfAbsent(sample, Dummy.VALUE);
            if (sneaky == null) {
              return sample;
            } else {
              /* Someone beat us to it! Trying again...
               *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 13 14:30:51 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/helper/ProcessHelper.java

            destroyProcess(sessionId);
            JobProcess jobProcess;
            try {
                jobProcess = new JobProcess(pb.start(), bufferSize, outputCallback);
                destroyProcess(sessionId, runningProcessMap.putIfAbsent(sessionId, jobProcess));
                return jobProcess;
            } catch (final IOException e) {
                throw new JobProcessingException("Crawler Process terminated.", e);
            }
        }
    
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 6.4K bytes
    - Viewed (0)
Back to top