Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for newHashMapWithExpectedSize (0.44 sec)

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

        super(Platform.<K, Collection<V>>newHashMapWithExpectedSize(expectedKeys));
        Preconditions.checkArgument(expectedValuesPerKey >= 0);
        this.expectedValuesPerKey = expectedValuesPerKey;
      }
    
      private HashMultimap(Multimap<? extends K, ? extends V> multimap) {
        super(Platform.<K, Collection<V>>newHashMapWithExpectedSize(multimap.keySet().size()));
        putAll(multimap);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Aug 02 10:02:49 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  2. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java

    /**
     * Minimal GWT emulation of {@code com.google.common.collect.Platform}.
     *
     * @author Hayward Chan
     */
    final class Platform {
      static <K, V> Map<K, V> newHashMapWithExpectedSize(int expectedSize) {
        return Maps.newHashMapWithExpectedSize(expectedSize);
      }
    
      static <K, V> Map<K, V> newLinkedHashMapWithExpectedSize(int expectedSize) {
        return Maps.newLinkedHashMapWithExpectedSize(expectedSize);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 06 17:52:51 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. 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.
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 06 17:52:51 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/JdkBackedImmutableMap.java

       */
      static <K, V> ImmutableMap<K, V> create(
          int n, @Nullable Entry<K, V>[] entryArray, boolean throwIfDuplicateKeys) {
        Map<K, V> delegateMap = Maps.newHashMapWithExpectedSize(n);
        // If duplicates are allowed, this map will track the last value for each duplicated key.
        // A second pass will retain only the first entry for that key, but with this last value. The
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/HashMultiset.java

        return multiset;
      }
    
      private HashMultiset() {
        super(new HashMap<E, Count>());
      }
    
      private HashMultiset(int distinctElements) {
        super(Maps.<E, Count>newHashMapWithExpectedSize(distinctElements));
      }
    
      /**
       * @serialData the number of distinct elements, the first element, its count, the second element,
       *     its count, and so on
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  6. 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;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Platform.java

    @ElementTypesAreNonnullByDefault
    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.
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 06 17:52:51 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  8. 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());
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  9. 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());
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/LinkedListMultimap.java

        return new LinkedListMultimap<>(multimap);
      }
    
      LinkedListMultimap() {
        this(12);
      }
    
      private LinkedListMultimap(int expectedKeys) {
        keyToKeyList = Platform.newHashMapWithExpectedSize(expectedKeys);
      }
    
      private LinkedListMultimap(Multimap<? extends K, ? extends V> multimap) {
        this(multimap.keySet().size());
        putAll(multimap);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 13 14:11:58 UTC 2023
    - 27.5K bytes
    - Viewed (0)
Back to top