Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for maximumSize (0.92 sec)

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

            .addEqualityGroup(parse("initialCapacity=15"), parse("initialCapacity=15"))
            .addEqualityGroup(parse("maximumSize=7"), parse("maximumSize=7"))
            .addEqualityGroup(parse("maximumSize=15"), parse("maximumSize=15"))
            .addEqualityGroup(parse("maximumWeight=7"), parse("maximumWeight=7"))
            .addEqualityGroup(parse("maximumWeight=15"), parse("maximumWeight=15"))
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

         * {@code maximumSize} elements. Each time a queue grows beyond this bound, it immediately
         * removes its greatest element (according to its comparator), which might be the element that
         * was just added.
         */
        @CanIgnoreReturnValue
        public Builder<B> maximumSize(int maximumSize) {
          checkArgument(maximumSize > 0);
          this.maximumSize = maximumSize;
          return this;
        }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 18:35:44 UTC 2025
    - 33.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/cache/CacheEvictionTest.java

    import java.util.List;
    import java.util.Set;
    import junit.framework.TestCase;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Tests relating to cache eviction: what does and doesn't count toward maximumSize, what happens
     * when maximumSize is reached, etc.
     *
     * @author mike nonemacher
     */
    @NullUnmarked
    public class CacheEvictionTest extends TestCase {
      static final int MAX_SIZE = 100;
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 18:19:59 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        assertThrows(IllegalArgumentException.class, () -> builder.maximumSize(-1));
      }
    
      public void testMaximumSize_setTwice() {
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().maximumSize(16);
        assertThrows(IllegalStateException.class, () -> builder.maximumSize(16));
      }
    
      @GwtIncompatible // maximumWeight
      public void testMaximumSize_andWeight() {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 25.4K bytes
    - Viewed (0)
  5. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

        /* Implements size-capped LinkedHashMap */
        final long maximumSize = builder.maximumSize;
        this.cachingHashMap =
            new CapacityEnforcingLinkedHashMap<K, V>(
                builder.getInitialCapacity(),
                0.75f,
                (builder.maximumSize != UNSET_INT),
                builder.maximumSize,
                statsCounter,
                removalListener);
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 21.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

        tester.testAllPublicInstanceMethods(makeCache(createCacheBuilder(), loader));
      }
    
      // stats tests
    
      public void testStats() {
        CacheBuilder<Object, Object> builder = createCacheBuilder().concurrencyLevel(1).maximumSize(2);
        LocalLoadingCache<Object, Object> cache = makeCache(builder, identityLoader());
        assertThat(cache.stats()).isEqualTo(EMPTY_STATS);
    
        Object one = new Object();
        cache.getUnchecked(one);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 13.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

            rawtypeToWildcard(MinMaxPriorityQueue.maximumSize(42)).create();
        assertEquals(11, queue.capacity());
        assertEquals(42, queue.maximumSize);
        checkNatural(queue);
      }
    
      public void testCreation_comparator_maximumSize() {
        MinMaxPriorityQueue<Integer> queue =
            MinMaxPriorityQueue.orderedBy(SOME_COMPARATOR).maximumSize(42).create();
        assertEquals(11, queue.capacity());
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 36.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

        // WARMUP_MAX), but the tests assume no values get evicted. Even with a maximumSize of 100, one
        // of the values gets evicted. With weak keys, we use identity equality, which means using
        // System.identityHashCode, which means the assignment of keys to segments is nondeterministic,
        // so more than (maximumSize / #segments) keys could get assigned to the same segment, which
        // would cause one to be evicted.
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 15.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

        cache.put(0, 10);
        cache.invalidateAll();
        assertThat(cache.get(0, loader)).isEqualTo(4);
      }
    
      @Test
      public void sizeConstraint() {
        Cache<Integer, Integer> cache = CacheBuilder.newBuilder().maximumSize(4).build();
    
        cache.put(1, 10);
        cache.put(2, 20);
        cache.put(3, 30);
        cache.put(4, 40);
        cache.put(5, 50);
    
        assertThat(cache.getIfPresent(10)).isNull();
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 14.8K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

        // WARMUP_MAX), but the tests assume no values get evicted. Even with a maximumSize of 100, one
        // of the values gets evicted. With weak keys, we use identity equality, which means using
        // System.identityHashCode, which means the assignment of keys to segments is nondeterministic,
        // so more than (maximumSize / #segments) keys could get assigned to the same segment, which
        // would cause one to be evicted.
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 15.7K bytes
    - Viewed (0)
Back to top