Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for weakKeys (0.06 sec)

  1. 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)
  2. 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)
  3. 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
    - 112.3K bytes
    - Viewed (0)
  4. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/MapMakerInternalMapTest.java

      private static Iterable<MapMaker> allWeakKeyStrengthMakers() {
        return ImmutableList.of(createMapMaker().weakKeys(), createMapMaker().weakKeys().weakValues());
      }
    
      private static Iterable<MapMaker> allWeakValueStrengthMakers() {
        return ImmutableList.of(
            createMapMaker().weakValues(), createMapMaker().weakKeys().weakValues());
      }
    
      public void testNullParameters() throws Exception {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 35.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/MapMakerInternalMapTest.java

      private static Iterable<MapMaker> allWeakKeyStrengthMakers() {
        return ImmutableList.of(createMapMaker().weakKeys(), createMapMaker().weakKeys().weakValues());
      }
    
      private static Iterable<MapMaker> allWeakValueStrengthMakers() {
        return ImmutableList.of(
            createMapMaker().weakValues(), createMapMaker().weakKeys().weakValues());
      }
    
      public void testNullParameters() throws Exception {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 35.1K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/Interners.java

          this.mapMaker.concurrencyLevel(concurrencyLevel);
          return this;
        }
    
        public <E> Interner<E> build() {
          if (!strong) {
            mapMaker.weakKeys();
          }
          return new InternerImpl<>(mapMaker);
        }
      }
    
      /** Returns a fresh {@link InternerBuilder} instance. */
      public static InternerBuilder newBuilder() {
        return new InternerBuilder();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 13 14:30:51 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/util/concurrent/FuturesGetChecked.java

           * UnsignedBytesBenchmark. TODO(cpovirk): benchmark this
           */
          /*
           * A CopyOnWriteArraySet<WeakReference> is faster than a newSetFromMap of a MapMaker map with
           * weakKeys() and concurrencyLevel(1), even up to at least 12 cached exception types.
           */
          private static final Set<WeakReference<Class<? extends Exception>>> validClasses =
              new CopyOnWriteArraySet<>();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 17:40:56 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Interners.java

          this.mapMaker.concurrencyLevel(concurrencyLevel);
          return this;
        }
    
        public <E> Interner<E> build() {
          if (!strong) {
            mapMaker.weakKeys();
          }
          return new InternerImpl<>(mapMaker);
        }
      }
    
      /** Returns a fresh {@link InternerBuilder} instance. */
      public static InternerBuilder newBuilder() {
        return new InternerBuilder();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 13 14:30:51 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Platform.java

       * that reclamation becomes important.
       */
      @J2ktIncompatible
      static MapMaker tryWeakKeys(MapMaker mapMaker) {
        return mapMaker.weakKeys();
      }
    
      static <E extends Enum<E>> Class<E> getDeclaringClassOrObjectForJ2cl(E e) {
        return e.getDeclaringClass();
      }
    
      static int reduceIterationsIfGwt(int iterations) {
        return iterations;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 06 17:52:51 UTC 2024
    - 5.3K bytes
    - Viewed (0)
Back to top