Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 166 for multimaps (0.09 sec)

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

       * assertThat(colorForName).containsEntry("red", red);
       * }</pre>
       *
       * <p>If your index may associate multiple values with each key, use {@link
       * Multimaps#index(Iterable, Function) Multimaps.index}.
       *
       * <p><b>Note:</b> on Java 8+, it is usually better to use streams. For example:
       *
       * <pre>{@code
       * import static com.google.common.collect.ImmutableMap.toImmutableMap;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 167.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/FluentIterable.java

       * iterable will be stored as a value in the resulting multimap, yielding a multimap with the same
       * size as this iterable. The key used to store that value in the multimap will be the result of
       * calling the function on that value. The resulting multimap is created as an immutable snapshot.
       * In the returned multimap, keys appear in the order they are first encountered, and the values
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 24 13:42:31 UTC 2024
    - 35.7K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/google/SetMultimapEqualsTester.java

        SetMultimap<K, V> multimap1 =
            getSubjectGenerator()
                .create(mapEntry(k0(), v0()), mapEntry(k0(), v1()), mapEntry(k0(), v4()));
        SetMultimap<K, V> multimap2 =
            getSubjectGenerator()
                .create(mapEntry(k0(), v1()), mapEntry(k0(), v0()), mapEntry(k0(), v4()));
        new EqualsTester().addEqualityGroup(multimap1, multimap2).testEquals();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  4. 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)
  5. android/guava-testlib/src/com/google/common/collect/testing/google/ListMultimapEqualsTester.java

        ListMultimap<K, V> multimap1 =
            getSubjectGenerator()
                .create(mapEntry(k0(), v0()), mapEntry(k0(), v1()), mapEntry(k0(), v0()));
        ListMultimap<K, V> multimap2 =
            getSubjectGenerator()
                .create(mapEntry(k0(), v1()), mapEntry(k0(), v0()), mapEntry(k0(), v0()));
        new EqualsTester().addEqualityGroup(multimap1).addEqualityGroup(multimap2).testEquals();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  6. 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.8K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapReplaceValuesTester.java

      public void testReplaceValuesWithDuplicates() {
        int size = multimap().size();
        List<V> oldValues = new ArrayList<>(multimap().get(k0()));
        List<V> values = asList(v0(), v3(), v0());
        assertEquals(oldValues, new ArrayList<V>(multimap().replaceValues(k0(), values)));
        assertEquals(size - oldValues.size() + multimap().get(k0()).size(), multimap().size());
        assertTrue(multimap().get(k0()).containsAll(values));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapSizeTester.java

        extends AbstractMultimapTester<K, V, Multimap<K, V>> {
    
      public void testSize() {
        int expectedSize = getNumElements();
        Multimap<K, V> multimap = multimap();
        assertEquals(expectedSize, multimap.size());
    
        int size = 0;
        for (Entry<K, V> entry : multimap.entries()) {
          assertTrue(multimap.containsEntry(entry.getKey(), entry.getValue()));
          size++;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapPutIterableTester.java

            NullPointerException.class, () -> multimap().putAll(k3(), Lists.newArrayList(v3(), null)));
    
        Collection<V> values = multimap().get(k3());
        if (values.size() == 0) {
          expectUnchanged();
          // Be extra thorough in case internal state was corrupted by the expected null.
          assertEquals(Lists.newArrayList(), Lists.newArrayList(values));
          assertEquals(size, multimap().size());
        } else {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapKeysTester.java

      }
    
      public void testKeysElementSet() {
        assertEquals(multimap().keySet(), multimap().keys().elementSet());
      }
    
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testKeysRemove() {
        int original = multimap().keys().remove(k0(), 1);
        assertEquals(max(original - 1, 0), multimap().get(k0()).size());
      }
    
      @CollectionSize.Require(ONE)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.2K bytes
    - Viewed (0)
Back to top