Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for Capacity (0.05 sec)

  1. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBenchmark.java

        queue = (BlockingQueue<String>) constructor.newInstance(capacity);
    
        strings = new String[capacity];
        for (int i = 0; i < capacity; i++) {
          strings[i] = String.valueOf(Math.random());
        }
      }
    
      @Benchmark
      void addsAndRemoves(int reps) {
        int capacity = this.capacity;
        BlockingQueue<String> queue = this.queue;
        String[] strings = this.strings;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/cache/SegmentBenchmark.java

      @Param({"16", "32", "64", "128", "256", "512", "1024", "2048", "4096", "8192"})
      int capacity;
    
      private Segment<Object, Object> segment;
    
      @BeforeExperiment
      void setUp() {
        LocalCache<Object, Object> cache =
            new LocalCache<>(
                CacheBuilder.newBuilder().concurrencyLevel(1).initialCapacity(capacity), null);
        checkState(cache.segments.length == 1);
        segment = cache.segments[0];
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/collection/LruHashSet.java

    import java.util.Iterator;
    import java.util.Set;
    
    /**
     * A {@link Set} implementation that stores its elements in a {@link LruHashMap}.
     * <p>
     * This set has a fixed maximum capacity. When the capacity is reached and a new element is added,
     * the least recently used element is removed.
     * </p>
     * @author shinsuke
     * @param <E> the type of elements maintained by this set
     */
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat Jul 05 00:11:05 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/collection/LruHashMap.java

     * @param <K> the key type
     * @param <V> the value type
     */
    public class LruHashMap<K, V> extends LinkedHashMap<K, V> {
    
        private static final long serialVersionUID = 1L;
    
        /**
         * Default initial capacity.
         */
        protected static final int DEFAULT_INITIAL_CAPACITY = 16;
    
        /**
         * Default load factor.
         */
        protected static final float DEFAULT_LOAD_FACTOR = 0.75f;
    
        /**
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ObjectCountLinkedHashMap.java

      }
    
      /**
       * Creates a {@code ObjectCountLinkedHashMap} instance, with a high enough "initial capacity" that
       * it <i>should</i> hold {@code expectedSize} elements without growth.
       *
       * @param expectedSize the number of elements you expect to add to the returned set
       * @return a new, empty {@code ObjectCountLinkedHashMap} with enough capacity to hold {@code
       *     expectedSize} elements without resizing
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 5.9K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/collection/CaseInsensitiveSet.java

            map = new CaseInsensitiveMap<>(Math.max((int) (c.size() / .75f) + 1, 16));
            addAll(c);
        }
    
        /**
         * Creates a {@link CaseInsensitiveSet}.
         *
         * @param initialCapacity the initial capacity
         */
        public CaseInsensitiveSet(final int initialCapacity) {
            map = new CaseInsensitiveMap<>(initialCapacity);
        }
    
        @Override
        public Iterator<String> iterator() {
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dispatcher.kt

          val i = readyAsyncCalls.iterator()
          while (i.hasNext()) {
            val asyncCall = i.next()
    
            if (runningAsyncCalls.size >= this.maxRequests) break // Max capacity.
            if (asyncCall.callsPerHost.get() >= this.maxRequestsPerHost) continue // Host max capacity.
    
            i.remove()
            asyncCall.callsPerHost.incrementAndGet()
            executableCalls.add(asyncCall)
            runningAsyncCalls.add(asyncCall)
          }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/CompactLinkedHashSet.java

      /**
       * Creates a {@code CompactLinkedHashSet} instance, with a high enough "initial capacity" that it
       * <i>should</i> hold {@code expectedSize} elements without rebuilding internal data structures.
       *
       * @param expectedSize the number of elements you expect to add to the returned set
       * @return a new, empty {@code CompactLinkedHashSet} with enough capacity to hold {@code
       *     expectedSize} elements without resizing
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 06 14:59:07 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/HashMultiset.java

     * @since 2.0
     */
    @GwtCompatible
    public final class HashMultiset<E extends @Nullable Object> extends AbstractMapBasedMultiset<E> {
    
      /** Creates a new, empty {@code HashMultiset} using the default initial capacity. */
      public static <E extends @Nullable Object> HashMultiset<E> create() {
        return new HashMultiset<>();
      }
    
      /**
       * Creates a new, empty {@code HashMultiset} with the specified expected number of distinct
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/graph/GraphConstants.java

      private GraphConstants() {}
    
      static final int EXPECTED_DEGREE = 2;
    
      static final int DEFAULT_NODE_COUNT = 10;
      static final int DEFAULT_EDGE_COUNT = DEFAULT_NODE_COUNT * EXPECTED_DEGREE;
    
      // Load factor and capacity for "inner" (i.e. per node/edge element) hash sets or maps
      static final float INNER_LOAD_FACTOR = 1.0f;
      static final int INNER_CAPACITY = 2; // ceiling(EXPECTED_DEGREE / INNER_LOAD_FACTOR)
    
      // Error messages
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Jan 18 02:54:30 UTC 2025
    - 3.1K bytes
    - Viewed (0)
Back to top