Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for weakKeys (0.04 sec)

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

        assertCacheBuilderEquivalence(CacheBuilder.newBuilder().weakKeys(), CacheBuilder.from(spec));
      }
    
      public void testParse_weakKeysCannotHaveValue() {
        assertThrows(IllegalArgumentException.class, () -> parse("weakKeys=true"));
      }
    
      public void testParse_repeatedKeyStrength() {
        assertThrows(IllegalArgumentException.class, () -> parse("weakKeys, weakKeys"));
      }
    
      public void testParse_softValues() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

        assertCacheBuilderEquivalence(CacheBuilder.newBuilder().weakKeys(), CacheBuilder.from(spec));
      }
    
      public void testParse_weakKeysCannotHaveValue() {
        assertThrows(IllegalArgumentException.class, () -> parse("weakKeys=true"));
      }
    
      public void testParse_repeatedKeyStrength() {
        assertThrows(IllegalArgumentException.class, () -> parse("weakKeys, weakKeys"));
      }
    
      public void testParse_softValues() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/MapMaker.java

     * in {@linkplain WeakReference weak} references.
     *
     * <p>Usage example:
     *
     * {@snippet :
     * ConcurrentMap<Request, Stopwatch> timers = new MapMaker()
     *     .concurrencyLevel(4)
     *     .weakKeys()
     *     .makeMap();
     * }
     *
     * <p>These features are all optional; {@code new MapMaker().makeMap()} returns a valid concurrent
     * map that behaves similarly to a {@link ConcurrentHashMap}.
     *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/cache/CacheBuilder.java

     * maximumSize}, {@link #maximumWeight(long) maximumWeight}, {@link #expireAfterWrite
     * expireAfterWrite}, {@link #expireAfterAccess expireAfterAccess}, {@link #weakKeys weakKeys},
     * {@link #weakValues weakValues}, or {@link #softValues softValues} are requested.
     *
     * <p>If {@link #maximumSize(long) maximumSize} or {@link #maximumWeight(long) maximumWeight} is
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 51.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

                } else {
                  return "0";
                }
              }
            };
    
        LoadingCache<Integer, String> recursiveCache =
            CacheBuilder.newBuilder().weakKeys().weakValues().build(recursiveLoader);
        cacheRef.set(recursiveCache);
        assertEquals("3, 2, 1, 0", recursiveCache.getUnchecked(3));
    
        recursiveLoader =
            new CacheLoader<Integer, String>() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/cache/RemovalCause.java

        boolean wasEvicted() {
          return false;
        }
      },
    
      /**
       * The entry was removed automatically because its key or value was garbage-collected. This can
       * occur when using {@link CacheBuilder#weakKeys}, {@link CacheBuilder#weakValues}, or {@link
       * CacheBuilder#softValues}.
       */
      COLLECTED {
        @Override
        boolean wasEvicted() {
          return true;
        }
      },
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

      /** Returns an iterable containing all combinations weakKeys and weak/softValues. */
      private static Iterable<CacheBuilder<Object, Object>> allKeyValueStrengthMakers() {
        return ImmutableList.of(
            createCacheBuilder(),
            createCacheBuilder().weakValues(),
            createCacheBuilder().softValues(),
            createCacheBuilder().weakKeys(),
            createCacheBuilder().weakKeys().weakValues(),
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 110.5K bytes
    - Viewed (0)
  8. guava/src/com/google/common/eventbus/SubscriberRegistry.java

       * created and objects of the same class are registered on all of them.
       */
      private static final LoadingCache<Class<?>, ImmutableList<Method>> subscriberMethodsCache =
          CacheBuilder.newBuilder()
              .weakKeys()
              .build(CacheLoader.from(SubscriberRegistry::getAnnotatedMethodsNotCached));
    
      /**
       * Returns all subscribers for the given listener grouped by the type of event they subscribe to.
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  9. guava/src/com/google/common/cache/RemovalCause.java

        boolean wasEvicted() {
          return false;
        }
      },
    
      /**
       * The entry was removed automatically because its key or value was garbage-collected. This can
       * occur when using {@link CacheBuilder#weakKeys}, {@link CacheBuilder#weakValues}, or {@link
       * CacheBuilder#softValues}.
       */
      COLLECTED {
        @Override
        boolean wasEvicted() {
          return true;
        }
      },
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/BenchmarkHelpers.java

            ConcurrentMap<K, V> newMap = new MapMaker().weakKeys().makeMap();
            checkState(newMap instanceof MapMakerInternalMap);
            newMap.putAll(map);
            return newMap;
          }
        },
        MapMakerWeakKeysWeakValues {
          @Override
          public <K extends Comparable<K>, V> Map<K, V> create(Map<K, V> map) {
            ConcurrentMap<K, V> newMap = new MapMaker().weakKeys().weakValues().makeMap();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 12.5K bytes
    - Viewed (0)
Back to top