Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for expectedValuesPerKey (0.19 sec)

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

        this(12, DEFAULT_VALUES_PER_KEY);
      }
    
      private HashMultimap(int expectedKeys, int expectedValuesPerKey) {
        super(Platform.<K, Collection<V>>newHashMapWithExpectedSize(expectedKeys));
        Preconditions.checkArgument(expectedValuesPerKey >= 0);
        this.expectedValuesPerKey = expectedValuesPerKey;
      }
    
      private HashMultimap(Multimap<? extends K, ? extends V> 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. android/guava/src/com/google/common/collect/MultimapBuilder.java

          implements Supplier<List<V>>, Serializable {
        private final int expectedValuesPerKey;
    
        ArrayListSupplier(int expectedValuesPerKey) {
          this.expectedValuesPerKey = checkNonnegative(expectedValuesPerKey, "expectedValuesPerKey");
        }
    
        @Override
        public List<V> get() {
          return new ArrayList<>(expectedValuesPerKey);
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ArrayListMultimapTest.java

        ArrayListMultimap<String, Integer> multimap = ArrayListMultimap.create();
        assertEquals(3, multimap.expectedValuesPerKey);
      }
    
      public void testCreateFromSizes() {
        ArrayListMultimap<String, Integer> multimap = ArrayListMultimap.create(15, 20);
        assertEquals(20, multimap.expectedValuesPerKey);
      }
    
      public void testCreateFromIllegalSizes() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/ImmutableMultimapTest.java

        assertThrows(
            IllegalArgumentException.class, () -> ImmutableMultimap.builder().expectedValuesPerKey(-1));
      }
    
      public void testBuilderWithExpectedValuesPerKeyZero() {
        ImmutableMultimap.Builder<String, String> builder =
            ImmutableMultimap.<String, String>builder().expectedValuesPerKey(0);
        builder.put("key", "value");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/ArrayListMultimapTest.java

        ArrayListMultimap<String, Integer> multimap = ArrayListMultimap.create();
        assertEquals(3, multimap.expectedValuesPerKey);
      }
    
      public void testCreateFromSizes() {
        ArrayListMultimap<String, Integer> multimap = ArrayListMultimap.create(15, 20);
        assertEquals(20, multimap.expectedValuesPerKey);
      }
    
      public void testCreateFromIllegalSizes() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/ImmutableMultimapTest.java

        assertThrows(
            IllegalArgumentException.class, () -> ImmutableMultimap.builder().expectedValuesPerKey(-1));
      }
    
      public void testBuilderWithExpectedValuesPerKeyZero() {
        ImmutableMultimap.Builder<String, String> builder =
            ImmutableMultimap.<String, String>builder().expectedValuesPerKey(0);
        builder.put("key", "value");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/HashMultimapTest.java

        assertEquals(2, copy.expectedValuesPerKey);
      }
    
      public void testCreateFromSizes() {
        HashMultimap<String, Integer> multimap = HashMultimap.create(20, 15);
        multimap.put("foo", 1);
        multimap.put("bar", 2);
        multimap.put("foo", 3);
        assertEquals(ImmutableSet.of(1, 3), multimap.get("foo"));
        assertEquals(15, multimap.expectedValuesPerKey);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/HashMultimapTest.java

        assertEquals(2, copy.expectedValuesPerKey);
      }
    
      public void testCreateFromSizes() {
        HashMultimap<String, Integer> multimap = HashMultimap.create(20, 15);
        multimap.put("foo", 1);
        multimap.put("bar", 2);
        multimap.put("foo", 3);
        assertEquals(ImmutableSet.of(1, 3), multimap.get("foo"));
        assertEquals(15, multimap.expectedValuesPerKey);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableMultimap.java

          checkNonnegative(expectedValuesPerKey, "expectedValuesPerKey");
    
          // Always presize to at least 1, since we only bother creating a value collection if there's
          // at least one element.
          this.expectedValuesPerKey = max(expectedValuesPerKey, 1);
    
          return this;
        }
    
        /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/LinkedHashMultimap.java

       * @param expectedValuesPerKey the expected average number of values per key
       * @throws IllegalArgumentException if {@code expectedKeys} or {@code expectedValuesPerKey} is
       *     negative
       */
      public static <K extends @Nullable Object, V extends @Nullable Object>
          LinkedHashMultimap<K, V> create(int expectedKeys, int expectedValuesPerKey) {
        return new LinkedHashMultimap<>(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 24.3K bytes
    - Viewed (0)
Back to top