Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 135 for Collector (0.24 sec)

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

      static <E> Collector<E, ?, ImmutableSet<E>> toImmutableSet() {
        return (Collector) TO_IMMUTABLE_SET;
      }
    
      static <E> Collector<E, ?, ImmutableSortedSet<E>> toImmutableSortedSet(
          Comparator<? super E> comparator) {
        checkNotNull(comparator);
        return Collector.of(
            () -> new ImmutableSortedSet.Builder<E>(comparator),
            ImmutableSortedSet.Builder::add,
            ImmutableSortedSet.Builder::combine,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 16.9K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/CollectCollectors.java

      static <E> Collector<E, ?, ImmutableSet<E>> toImmutableSet() {
        return (Collector) TO_IMMUTABLE_SET;
      }
    
      static <E> Collector<E, ?, ImmutableSortedSet<E>> toImmutableSortedSet(
          Comparator<? super E> comparator) {
        checkNotNull(comparator);
        return Collector.of(
            () -> new ImmutableSortedSet.Builder<E>(comparator),
            ImmutableSortedSet.Builder::add,
            ImmutableSortedSet.Builder::combine,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/TableCollectorsTest.java

        {
          Collector<Cell<String, String, Integer>, ?, ImmutableTable<String, String, Integer>>
              collector = toImmutableTable(Cell::getRowKey, Cell::getColumnKey, t -> null);
          assertThrows(
              NullPointerException.class,
              () -> Stream.of(immutableCell("one", "uno", 1)).collect(collector));
        }
        {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top