Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for newHashMapWithExpectedSize (0.42 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);
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  2. android/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);
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  3. 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);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Jun 29 18:16:45 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/JdkBackedImmutableBiMap.java

      @VisibleForTesting
      static <K, V> ImmutableBiMap<K, V> create(int n, @Nullable Entry<K, V>[] entryArray) {
        Map<K, V> forwardDelegate = Maps.newHashMapWithExpectedSize(n);
        Map<V, K> backwardDelegate = Maps.newHashMapWithExpectedSize(n);
        for (int i = 0; i < n; i++) {
          // requireNonNull is safe because the first `n` elements have been filled in.
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  5. 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.
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  6. 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
       */
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  7. 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
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 4.8K 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());
          default:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 6.7K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/ArrayListMultimap.java

      }
    
      private ArrayListMultimap() {
        this(12, DEFAULT_VALUES_PER_KEY);
      }
    
      private ArrayListMultimap(int expectedKeys, int expectedValuesPerKey) {
        super(Platform.<K, Collection<V>>newHashMapWithExpectedSize(expectedKeys));
        checkNonnegative(expectedValuesPerKey, "expectedValuesPerKey");
        this.expectedValuesPerKey = expectedValuesPerKey;
      }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ArrayListMultimap.java

      }
    
      private ArrayListMultimap() {
        this(12, DEFAULT_VALUES_PER_KEY);
      }
    
      private ArrayListMultimap(int expectedKeys, int expectedValuesPerKey) {
        super(Platform.<K, Collection<V>>newHashMapWithExpectedSize(expectedKeys));
        checkNonnegative(expectedValuesPerKey, "expectedValuesPerKey");
        this.expectedValuesPerKey = expectedValuesPerKey;
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 6.9K bytes
    - Viewed (0)
Back to top