Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for expectedSize (0.14 sec)

  1. guava/src/com/google/common/collect/MinMaxPriorityQueue.java

       * sized appropriately to hold {@code expectedSize} elements.
       */
      @SuppressWarnings("rawtypes") // https://github.com/google/guava/issues/989
      public static Builder<Comparable> expectedSize(int expectedSize) {
        return new Builder<Comparable>(Ordering.natural()).expectedSize(expectedSize);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/ObjectCountHashMap.java

      }
    
      ObjectCountHashMap(int expectedSize, float loadFactor) {
        init(expectedSize, loadFactor);
      }
    
      void init(int expectedSize, float loadFactor) {
        Preconditions.checkArgument(expectedSize >= 0, "Initial capacity must be non-negative");
        Preconditions.checkArgument(loadFactor > 0, "Illegal load factor");
        int buckets = Hashing.closedTableSize(expectedSize, loadFactor);
        this.table = newTable(buckets);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 01 22:07:10 UTC 2021
    - 15K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/CompactHashSet.java

       *
       * @param expectedSize the initial capacity of this {@code CompactHashSet}.
       */
      CompactHashSet(int expectedSize) {
        init(expectedSize);
      }
    
      /** Pseudoconstructor for serialization support. */
      void init(int expectedSize) {
        Preconditions.checkArgument(expectedSize >= 0, "Expected size must be >= 0");
    
        // Save expectedSize for use in allocArrays()
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 24K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/CompactLinkedHashMap.java

        this(CompactHashing.DEFAULT_SIZE);
      }
    
      CompactLinkedHashMap(int expectedSize) {
        this(expectedSize, false);
      }
    
      CompactLinkedHashMap(int expectedSize, boolean accessOrder) {
        super(expectedSize);
        this.accessOrder = accessOrder;
      }
    
      @Override
      void init(int expectedSize) {
        super.init(expectedSize);
        this.firstEntry = ENDPOINT;
        this.lastEntry = ENDPOINT;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/HashBiMap.java

      private HashBiMap(int expectedSize) {
        init(expectedSize);
      }
    
      @SuppressWarnings("unchecked")
      void init(int expectedSize) {
        CollectPreconditions.checkNonnegative(expectedSize, "expectedSize");
        int tableSize = Hashing.closedTableSize(expectedSize, 1.0);
        size = 0;
    
        keys = (K[]) new Object[expectedSize];
        values = (V[]) new Object[expectedSize];
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 06 16:06:58 UTC 2023
    - 36.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/ImmutableSetTest.java

      }
    
      @GwtIncompatible("Builder impl")
      public void testPresizedBuilderForceCopy() {
        for (int expectedSize = 1; expectedSize < 4; expectedSize++) {
          ImmutableSet.Builder<Integer> builder = ImmutableSet.builderWithExpectedSize(expectedSize);
          builder.add(-1);
          Object[] prevArray = null;
          for (int i = 0; i < 10; i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

       * sized appropriately to hold {@code expectedSize} elements.
       */
      @SuppressWarnings("rawtypes") // https://github.com/google/guava/issues/989
      public static Builder<Comparable> expectedSize(int expectedSize) {
        return new Builder<Comparable>(Ordering.natural()).expectedSize(expectedSize);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/HashBiMap.java

      private transient int mask;
      private transient int modCount;
    
      private HashBiMap(int expectedSize) {
        init(expectedSize);
      }
    
      private void init(int expectedSize) {
        checkNonnegative(expectedSize, "expectedSize");
        int tableSize = Hashing.closedTableSize(expectedSize, LOAD_FACTOR);
        this.hashTableKToV = createTable(tableSize);
        this.hashTableVToK = createTable(tableSize);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 13 14:11:58 UTC 2023
    - 24.5K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/CompactHashSet.java

       *
       * @param expectedSize the initial capacity of this {@code CompactHashSet}.
       */
      CompactHashSet(int expectedSize) {
        init(expectedSize);
      }
    
      /** Pseudoconstructor for serialization support. */
      void init(int expectedSize) {
        Preconditions.checkArgument(expectedSize >= 0, "Expected size must be >= 0");
    
        // Save expectedSize for use in allocArrays()
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.expectedSize(8).create();
        assertEquals(8, queue.capacity());
        checkUnbounded(queue);
        checkNatural(queue);
      }
    
      public void testCreation_expectedSize_comparator() {
        MinMaxPriorityQueue<Integer> queue =
            MinMaxPriorityQueue.orderedBy(SOME_COMPARATOR).expectedSize(8).create();
        assertEquals(8, queue.capacity());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35.9K bytes
    - Viewed (0)
Back to top