Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for invertFrom (0.09 sec)

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

        Multimap<String, Integer> multimap =
            Multimaps.invertFrom(empty, ArrayListMultimap.<String, Integer>create());
        assertTrue(multimap.isEmpty());
    
        ImmutableMultimap<Integer, String> single =
            new ImmutableMultimap.Builder<Integer, String>().put(1, "one").put(2, "two").build();
    
        // copy into existing multimap
        assertSame(multimap, Multimaps.invertFrom(single, multimap));
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 38.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Multimaps.java

       * @return {@code dest}
       */
      @CanIgnoreReturnValue
      public static <K extends @Nullable Object, V extends @Nullable Object, M extends Multimap<K, V>>
          M invertFrom(Multimap<? extends V, ? extends K> source, M dest) {
        checkNotNull(dest);
        for (Map.Entry<? extends V, ? extends K> entry : source.entries()) {
          dest.put(entry.getValue(), entry.getKey());
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 86.3K bytes
    - Viewed (0)
Back to top