Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 13 for newHashMapWithExpectedSize (0.22 seconds)

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

      /** Returns the platform preferred implementation of a map based on a hash table. */
      static <K extends @Nullable Object, V extends @Nullable Object>
          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.
       */
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 5.5K bytes
    - Click Count (0)
  2. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java

     *
     * @author Hayward Chan
     */
    final class Platform {
      static <K extends @Nullable Object, V extends @Nullable Object>
          Map<K, V> newHashMapWithExpectedSize(int expectedSize) {
        return Maps.newHashMapWithExpectedSize(expectedSize);
      }
    
      static <K extends @Nullable Object, V extends @Nullable Object>
          Map<K, V> newLinkedHashMapWithExpectedSize(int expectedSize) {
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Jun 10 15:17:16 GMT 2025
    - 5.5K bytes
    - Click Count (0)
  3. guava/src/com/google/common/collect/JdkBackedImmutableMultiset.java

        @SuppressWarnings("unchecked")
        Entry<E>[] entriesArray = entries.toArray((Entry<E>[]) new Entry<?>[0]);
        Map<E, Integer> delegateMap = Maps.newHashMapWithExpectedSize(entriesArray.length);
        long size = 0;
        for (int i = 0; i < entriesArray.length; i++) {
          Entry<E> entry = entriesArray[i];
          int count = entry.getCount();
          size += count;
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Sep 23 17:50:58 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  4. android/guava/src/com/google/common/collect/Platform.java

     */
    @GwtCompatible
    final class Platform {
      /** Returns the platform preferred implementation of a map based on a hash table. */
      static <K extends @Nullable Object, V extends @Nullable Object>
          Map<K, V> newHashMapWithExpectedSize(int expectedSize) {
        return CompactHashMap.createWithExpectedSize(expectedSize);
      }
    
      /**
       * Returns the platform preferred implementation of an insertion ordered map based on a hash
       * table.
       */
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 5.3K bytes
    - Click Count (0)
  5. guava/src/com/google/common/collect/ArrayListMultimap.java

      }
    
      private ArrayListMultimap() {
        this(12, DEFAULT_VALUES_PER_KEY);
      }
    
      private ArrayListMultimap(int expectedKeys, int expectedValuesPerKey) {
        super(Platform.newHashMapWithExpectedSize(expectedKeys));
        checkNonnegative(expectedValuesPerKey, "expectedValuesPerKey");
        this.expectedValuesPerKey = expectedValuesPerKey;
      }
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Fri Dec 05 23:15:58 GMT 2025
    - 6.8K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/graph/ElementOrder.java

      /** Returns an empty mutable map whose keys will respect this {@link ElementOrder}. */
      <K extends T, V> Map<K, V> createMap(int expectedSize) {
        switch (type) {
          case UNORDERED:
            return Maps.newHashMapWithExpectedSize(expectedSize);
          case INSERTION:
          case STABLE:
            return Maps.newLinkedHashMapWithExpectedSize(expectedSize);
          case SORTED:
            return Maps.newTreeMap(comparator());
        }
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Jul 08 18:32:10 GMT 2025
    - 6.6K bytes
    - Click Count (0)
  7. guava/src/com/google/common/graph/ElementOrder.java

      /** Returns an empty mutable map whose keys will respect this {@link ElementOrder}. */
      <K extends T, V> Map<K, V> createMap(int expectedSize) {
        switch (type) {
          case UNORDERED:
            return Maps.newHashMapWithExpectedSize(expectedSize);
          case INSERTION:
          case STABLE:
            return Maps.newLinkedHashMapWithExpectedSize(expectedSize);
          case SORTED:
            return Maps.newTreeMap(comparator());
        }
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Jul 08 18:32:10 GMT 2025
    - 6.6K bytes
    - Click Count (0)
  8. android/guava-tests/test/com/google/common/collect/MapsTest.java

        // after  jdk7u40: creates empty table
        assertThat(bucketsOf(Maps.newHashMapWithExpectedSize(0))).isAtMost(1);
    
        for (int size = 1; size < 200; size++) {
          assertWontGrow(
              size,
              new HashMap<>(),
              Maps.newHashMapWithExpectedSize(size),
              Maps.newHashMapWithExpectedSize(size));
        }
      }
    
      /** Same test as above but for newLinkedHashMapWithExpectedSize */
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Dec 11 22:56:33 GMT 2025
    - 62.7K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/collect/MapsTest.java

        // after  jdk7u40: creates empty table
        assertThat(bucketsOf(Maps.newHashMapWithExpectedSize(0))).isAtMost(1);
    
        for (int size = 1; size < 200; size++) {
          assertWontGrow(
              size,
              new HashMap<>(),
              Maps.newHashMapWithExpectedSize(size),
              Maps.newHashMapWithExpectedSize(size));
        }
      }
    
      /** Same test as above but for newLinkedHashMapWithExpectedSize */
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Dec 11 22:56:33 GMT 2025
    - 65K bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/collect/MultimapBuilder.java

        return new MultimapBuilderWithKeys<@Nullable Object>() {
          @Override
          <K extends @Nullable Object, V extends @Nullable Object> Map<K, Collection<V>> createMap() {
            return Platform.newHashMapWithExpectedSize(expectedKeys);
          }
        };
      }
    
      /**
       * Uses a hash table to map keys to value collections.
       *
       * <p>The collections returned by {@link Multimap#keySet()}, {@link Multimap#keys()}, and {@link
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Sep 22 18:35:44 GMT 2025
    - 18K bytes
    - Click Count (0)
Back to Top