Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 167 for Collector (0.06 sec)

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

        Collector<Entry<AnEnum, Integer>, ?, ImmutableMap<AnEnum, Integer>> collector =
            toImmutableEnumMap(Entry::getKey, Entry::getValue);
        assertThrows(
            IllegalArgumentException.class,
            () -> Stream.of(mapEntry(AnEnum.A, 1), mapEntry(AnEnum.A, 11)).collect(collector));
      }
    
      public void testToImmutableMapMerging() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/ImmutableTable.java

        implements Serializable {
    
      /**
       * Returns a {@code Collector} that accumulates elements into an {@code ImmutableTable}. Each
       * input element is mapped to one cell in the returned table, with the rows, columns, and values
       * generated by applying the specified functions.
       *
       * <p>The returned {@code Collector} will throw a {@code NullPointerException} at collection time
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 17.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ImmutableBiMap.java

       * operation is performed. (This differs from the {@code Collector} returned by {@link
       * Collectors#toMap(Function, Function)}, which throws an {@code IllegalStateException}.)
       *
       * @since 33.2.0 (available since 21.0 in guava-jre)
       */
      @IgnoreJRERequirement // Users will use this only if they're already using streams.
      public static <T extends @Nullable Object, K, V>
          Collector<T, ?, ImmutableBiMap<K, V>> toImmutableBiMap(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 22.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Tables.java

       * <p>If multiple input elements map to the same row and column, the specified merging function is
       * used to combine the values. Like {@link
       * java.util.stream.Collectors#toMap(java.util.function.Function, java.util.function.Function,
       * BinaryOperator, java.util.function.Supplier)}, this Collector throws a {@code
       * NullPointerException} on null values returned from {@code valueFunction}, and treats nulls
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 24.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/ImmutableSetTest.java

        assertNotSame(sortedSet, copy);
      }
    
      public void testToImmutableSet() {
        Collector<String, ?, ImmutableSet<String>> collector = toImmutableSet();
        Equivalence<ImmutableSet<String>> equivalence =
            Equivalence.equals().onResultOf(ImmutableSet::asList);
        CollectorTester.of(collector, equivalence)
            .expectCollects(ImmutableSet.of("a", "b", "c", "d"), "a", "b", "a", "c", "b", "b", "d");
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java

                .put("two", 2)
                .build();
        CollectorTester.of(collector, equivalence)
            .expectCollects(expected, mapEntry("one", 1), mapEntry("two", 2), mapEntry("three", 3));
      }
    
      public void testToImmutableSortedMap_exceptionOnDuplicateKey() {
        Collector<Entry<String, Integer>, ?, ImmutableSortedMap<String, Integer>> collector =
            toImmutableSortedMap(Ordering.natural(), Entry::getKey, Entry::getValue);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 27.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/hash/BloomFilter.java

        checkArgument(fpp < 1.0, "False positive probability (%s) must be < 1.0", fpp);
        return Collector.of(
            () -> BloomFilter.create(funnel, expectedInsertions, fpp),
            BloomFilter::put,
            (bf1, bf2) -> {
              bf1.putAll(bf2);
              return bf1;
            },
            Collector.Characteristics.UNORDERED,
            Collector.Characteristics.CONCURRENT);
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 31 13:15:26 UTC 2025
    - 26.9K bytes
    - Viewed (0)
  8. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSet.java

    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.Collections;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Set;
    import java.util.stream.Collector;
    import jsinterop.annotations.JsMethod;
    import org.jspecify.annotations.Nullable;
    
    /**
     * GWT emulated version of {@link com.google.common.collect.ImmutableSet}. For the unsorted sets,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 06 18:32:41 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  9. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableMap.java

      public static <T extends @Nullable Object, K, V>
          Collector<T, ?, ImmutableMap<K, V>> toImmutableMap(
              Function<? super T, ? extends K> keyFunction,
              Function<? super T, ? extends V> valueFunction) {
        return CollectCollectors.toImmutableMap(keyFunction, valueFunction);
      }
    
      public static <T extends @Nullable Object, K, V>
          Collector<T, ?, ImmutableMap<K, V>> toImmutableMap(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 06 18:32:41 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/testing/GcFinalization.java

        return max(10L, Runtime.getRuntime().totalMemory() / (32L * 1024L * 1024L));
      }
    
      /**
       * Waits until the given future {@linkplain Future#isDone is done}, invoking the garbage collector
       * as necessary to try to ensure that this will happen.
       *
       * @throws RuntimeException if timed out or interrupted while waiting
       */
      @SuppressWarnings("removal") // b/260137033
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 11.5K bytes
    - Viewed (0)
Back to top