Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 56 for expectedSize (0.07 sec)

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

          Map<K, V> newHashMapWithExpectedSize(int expectedSize) {
        return Maps.newHashMapWithExpectedSize(expectedSize);
      }
    
      /**
       * Returns the platform preferred implementation of an insertion ordered map based on a hash
       * table.
       */
      static <K extends @Nullable Object, V extends @Nullable Object>
          Map<K, V> newLinkedHashMapWithExpectedSize(int expectedSize) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 06 17:52:51 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/CompactLinkedHashMapTest.java

          map.put(1, Integer.toString(1));
          assertThat(map.needsAllocArrays()).isFalse();
          int expectedSize = max(1, i);
          assertThat(map.entries).hasLength(expectedSize);
          assertThat(map.keys).hasLength(expectedSize);
          assertThat(map.values).hasLength(expectedSize);
          assertThat(map.links).hasLength(expectedSize);
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. guava-testlib/src/com/google/common/collect/testing/google/MultimapSizeTester.java

      public void testSize() {
        int expectedSize = getNumElements();
        Multimap<K, V> multimap = multimap();
        assertEquals(expectedSize, multimap.size());
    
        int size = 0;
        for (Entry<K, V> entry : multimap.entries()) {
          assertTrue(multimap.containsEntry(entry.getKey(), entry.getValue()));
          size++;
        }
        assertEquals(expectedSize, size);
    
        int size2 = 0;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetElementSetTester.java

        Set<E> elementSet = getMultiset().elementSet();
        int size = getNumElements();
        int expectedSize = size - getMultiset().count(e0());
        assertTrue(elementSet.remove(e0()));
        assertFalse(getMultiset().contains(e0()));
        assertEquals(expectedSize, getMultiset().size());
      }
    
      @CollectionSize.Require(SEVERAL)
      @CollectionFeature.Require(SUPPORTS_REMOVE)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.2K 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