Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 217 for Multimap (5.4 sec)

  1. android/guava/src/com/google/common/collect/ImmutableListMultimap.java

       *
       * @throws NullPointerException if any key or value in {@code multimap} is null
       */
      public static <K, V> ImmutableListMultimap<K, V> copyOf(
          Multimap<? extends K, ? extends V> multimap) {
        if (multimap.isEmpty()) {
          return of();
        }
    
        // TODO(lowasser): copy ImmutableSetMultimap by using asList() on the sets
        if (multimap instanceof ImmutableListMultimap) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/FilteredMultimapTest.java

      }
    
      public void testFilterFiltered() {
        Multimap<String, Integer> unfiltered = HashMultimap.create();
        unfiltered.put("foo", 55556);
        unfiltered.put("badkey", 1);
        unfiltered.put("foo", 1);
        Multimap<String, Integer> keyFiltered = Multimaps.filterKeys(unfiltered, KEY_PREDICATE);
        Multimap<String, Integer> filtered = Multimaps.filterValues(keyFiltered, VALUE_PREDICATE);
        assertEquals(1, filtered.size());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ListMultimap.java

     * "https://github.com/google/guava/wiki/NewCollectionTypesExplained#multimap">{@code Multimap}</a>.
     *
     * @author Jared Levy
     * @since 2.0
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public interface ListMultimap<K extends @Nullable Object, V extends @Nullable Object>
        extends Multimap<K, V> {
      /**
       * {@inheritDoc}
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jan 24 17:47:51 GMT 2022
    - 3.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/TreeMultimapNaturalTest.java

        TreeMultimap<String, Integer> multimap = TreeMultimap.create();
        multimap.put("google", 2);
        multimap.put("google", 6);
        multimap.put("foo", 3);
        multimap.put("foo", 1);
        multimap.put("foo", 7);
        multimap.put("tree", 4);
        multimap.put("tree", 0);
        return multimap;
      }
    
      public void testToString() {
        SetMultimap<String, Integer> multimap = create();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/google/ListMultimapPutTester.java

      public void testPutDuplicateValue() {
        List<Entry<K, V>> entries = copyToList(multimap().entries());
    
        for (Entry<K, V> entry : entries) {
          resetContainer();
    
          K k = entry.getKey();
          V v = entry.getValue();
    
          List<V> values = multimap().get(k);
          List<V> expectedValues = copyToList(values);
    
          assertTrue(multimap().put(k, v));
          expectedValues.add(v);
          assertGet(k, expectedValues);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 2.6K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

          fail("putAll(Multimap<K, V>) succeeded on unmodifiable multimap");
        } catch (UnsupportedOperationException expected) {
        }
        assertMultimapRemainsUnmodified(multimap, originalEntries);
    
        // Test #remove()
        try {
          multimap.remove(sampleKey, sampleValue);
          fail("remove succeeded on unmodifiable multimap");
        } catch (UnsupportedOperationException expected) {
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 14.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java

        Multimap<String, Integer> multimap = ImmutableListMultimap.of();
        assertFalse(multimap.containsKey("foo"));
        assertFalse(multimap.containsValue(1));
        assertFalse(multimap.containsEntry("foo", 1));
        assertTrue(multimap.entries().isEmpty());
        assertTrue(multimap.equals(ArrayListMultimap.create()));
        assertEquals(Collections.emptyList(), multimap.get("foo"));
        assertEquals(0, multimap.hashCode());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 22.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/FilteredMultimapTest.java

      }
    
      public void testFilterFiltered() {
        Multimap<String, Integer> unfiltered = HashMultimap.create();
        unfiltered.put("foo", 55556);
        unfiltered.put("badkey", 1);
        unfiltered.put("foo", 1);
        Multimap<String, Integer> keyFiltered = Multimaps.filterKeys(unfiltered, KEY_PREDICATE);
        Multimap<String, Integer> filtered = Multimaps.filterValues(keyFiltered, VALUE_PREDICATE);
        assertEquals(1, filtered.size());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/ArrayListMultimapTest.java

        multimap.put("foo", 3);
        assertTrue(multimap.removeAll("foo") instanceof RandomAccess);
        assertTrue(multimap.removeAll("bar") instanceof RandomAccess);
      }
    
      /** Confirm that replaceValues() returns a List implementing RandomAccess. */
      public void testReplaceValuesRandomAccess() {
        Multimap<String, Integer> multimap = create();
        multimap.put("foo", 1);
        multimap.put("foo", 3);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/LinkedListMultimapTest.java

          @Override
          protected Iterator<String> newTargetIterator() {
            multimap = create();
            multimap.putAll("foo", asList(2, 3));
            multimap.putAll("bar", asList(4, 5));
            multimap.putAll("foo", asList(6));
            multimap.putAll("baz", asList(7, 8));
            multimap.putAll("dog", asList(9));
            multimap.putAll("bar", asList(10, 11));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 18K bytes
    - Viewed (0)
Back to top