Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 4 of 4 for createWithExpectedSize (0.14 seconds)

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

        return CompactHashMap.createWithExpectedSize(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) {
        return CompactLinkedHashMap.createWithExpectedSize(expectedSize);
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Jan 23 17:16:53 GMT 2026
    - 4.5K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/collect/CompactLinkedHashMapTest.java

        map.put(2, "c");
        map.remove(2);
        testHasMapEntriesInOrder(map, 1, "a", 4, "b", 3, "d");
      }
    
      public void testTrimToSize() {
        CompactLinkedHashMap<Integer, String> map = CompactLinkedHashMap.createWithExpectedSize(100);
        map.put(1, "a");
        map.put(4, "b");
        map.put(3, "d");
        map.put(2, "c");
        map.trimToSize();
        assertThat(map.entries).hasLength(4);
        assertThat(map.keys).hasLength(4);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Oct 28 18:44:53 GMT 2025
    - 6.7K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/collect/CompactHashMapTest.java

                .createTestSuite());
        suite.addTestSuite(CompactHashMapTest.class);
        return suite;
      }
    
      public void testTrimToSize() {
        CompactHashMap<Integer, String> map = CompactHashMap.createWithExpectedSize(100);
        for (int i = 0; i < 10; i++) {
          map.put(i, Integer.toString(i));
        }
        map.trimToSize();
        assertThat(map.entries).hasLength(10);
        assertThat(map.keys).hasLength(10);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 5.4K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/collect/CompactLinkedHashMapTest.java

        map.put(2, "c");
        map.remove(2);
        testHasMapEntriesInOrder(map, 1, "a", 4, "b", 3, "d");
      }
    
      public void testTrimToSize() {
        CompactLinkedHashMap<Integer, String> map = CompactLinkedHashMap.createWithExpectedSize(100);
        map.put(1, "a");
        map.put(4, "b");
        map.put(3, "d");
        map.put(2, "c");
        map.trimToSize();
        assertThat(map.entries).hasLength(4);
        assertThat(map.keys).hasLength(4);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Oct 28 18:44:53 GMT 2025
    - 7.8K bytes
    - Click Count (0)
Back to Top