Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for weakKeys (0.31 sec)

  1. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  2. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  3. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 52K bytes
    - Viewed (0)
  4. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  5. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  6. android/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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 15:16:45 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  7. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  8. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

            () -> CacheBuilder.newBuilder().maximumSize(1).weigher(constantWeigher(42)));
      }
    
      @GwtIncompatible // weakKeys
      public void testKeyStrengthSetTwice() {
        CacheBuilder<Object, Object> builder1 = CacheBuilder.newBuilder().weakKeys();
        assertThrows(IllegalStateException.class, () -> builder1.weakKeys());
      }
    
      @GwtIncompatible // weakValues
      public void testValueStrengthSetTwice() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  10. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 110.6K bytes
    - Viewed (0)
Back to top