Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for Multimap (0.08 sec)

  1. android/guava-tests/test/com/google/common/collect/MultimapsCollectionTest.java

      static void populateMultimapForGet(Multimap<Integer, String> multimap, String[] elements) {
        multimap.put(2, "foo");
        for (String element : elements) {
          multimap.put(3, element);
        }
      }
    
      static void populateMultimapForKeySet(Multimap<String, Integer> multimap, String[] elements) {
        for (String element : elements) {
          multimap.put(element, 2);
          multimap.put(element, 3);
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/MultimapsTest.java

        multimap.put("bar", 5);
        multimap.put("bar", -1);
        multimap.put(nullKey, nullValue);
        multimap.put("foo", nullValue);
        multimap.put(nullKey, 5);
        multimap.put("foo", 2);
    
        if (permitsDuplicates) {
          assertEquals(9, multimap.size());
        } else {
          assertEquals(8, multimap.size());
        }
    
        Multimap<@Nullable String, @Nullable Integer> unmodifiable;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 38.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java

        assertTrue(multimap.containsEntry("foo", 1));
        assertFalse(multimap.containsEntry("cat", 1));
        assertFalse(multimap.containsEntry("foo", 5));
        assertFalse(multimap.entries().isEmpty());
        assertEquals(3, multimap.size());
        assertFalse(multimap.isEmpty());
        assertEquals("{foo=[1, 3], bar=[2]}", multimap.toString());
      }
    
      public void testMultimapWrites() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/MultimapsCollectionTest.java

      static void populateMultimapForGet(Multimap<Integer, String> multimap, String[] elements) {
        multimap.put(2, "foo");
        for (String element : elements) {
          multimap.put(3, element);
        }
      }
    
      static void populateMultimapForKeySet(Multimap<String, Integer> multimap, String[] elements) {
        for (String element : elements) {
          multimap.put(element, 2);
          multimap.put(element, 3);
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/LinkedHashMultimap.java

       * key-value mapping appears multiple times in the input multimap, it only appears once in the
       * constructed multimap. The new multimap has the same {@link Multimap#entries()} iteration order
       * as the input multimap, except for excluding duplicate mappings.
       *
       * @param multimap the multimap whose contents are copied to this multimap
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 24.3K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

        } catch (UnsupportedOperationException expected) {
        }
        assertMultimapRemainsUnmodified(multimap, originalEntries);
    
        // Test #putAll(Multimap<K, V>)
        Multimap<K, V> multimap2 = ArrayListMultimap.create();
        multimap2.put(sampleKey, sampleValue);
        try {
          multimap.putAll(multimap2);
          fail("putAll(Multimap<K, V>) succeeded on unmodifiable multimap");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableMultimap.java

       *
       * @throws NullPointerException if any key or value in {@code multimap} is null
       */
      public static <K, V> ImmutableMultimap<K, V> copyOf(Multimap<? extends K, ? extends V> multimap) {
        if (multimap instanceof ImmutableMultimap) {
          @SuppressWarnings("unchecked") // safe since multimap is not writable
          ImmutableMultimap<K, V> kvMultimap = (ImmutableMultimap<K, V>) multimap;
          if (!kvMultimap.isPartialView()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/ImmutableSetMultimap.java

       *
       * @throws NullPointerException if any key or value in {@code multimap} is null
       */
      public static <K, V> ImmutableSetMultimap<K, V> copyOf(
          Multimap<? extends K, ? extends V> multimap) {
        return copyOf(multimap, null);
      }
    
      private static <K, V> ImmutableSetMultimap<K, V> copyOf(
          Multimap<? extends K, ? extends V> multimap,
          @CheckForNull Comparator<? super V> valueComparator) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/ImmutableListMultimap.java

        if (multimap.isEmpty()) {
          return of();
        }
    
        // TODO(lowasser): copy ImmutableSetMultimap by using asList() on the sets
        if (multimap instanceof ImmutableListMultimap) {
          @SuppressWarnings("unchecked") // safe since multimap is not writable
          ImmutableListMultimap<K, V> kvMultimap = (ImmutableListMultimap<K, V>) multimap;
          if (!kvMultimap.isPartialView()) {
            return kvMultimap;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Aug 16 20:20:32 UTC 2024
    - 19K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/ImmutableSetMultimapTest.java

        Multimap<String, Integer> multimap = ImmutableSetMultimap.of();
        assertFalse(multimap.containsKey("foo"));
        assertFalse(multimap.containsValue(1));
        assertFalse(multimap.containsEntry("foo", 1));
        assertTrue(multimap.entries().isEmpty());
        assertTrue(multimap.equals(HashMultimap.create()));
        assertEquals(emptySet(), multimap.get("foo"));
        assertEquals(0, multimap.hashCode());
        assertTrue(multimap.isEmpty());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 26.9K bytes
    - Viewed (0)
Back to top