Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 149 for Collector (0.04 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-testlib/src/com/google/common/testing/CollectorTester.java

          CollectorTester<T, A, R> of(
              Collector<T, A, R> collector, BiPredicate<? super R, ? super R> equivalence) {
        return new CollectorTester<>(collector, equivalence);
      }
    
      private final Collector<T, A, R> collector;
      private final BiPredicate<? super R, ? super R> equivalence;
    
      private CollectorTester(
          Collector<T, A, R> collector, BiPredicate<? super R, ? super R> equivalence) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu May 15 21:47:56 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/MoreCollectors.java

       * collector without breaking j2cl?
       */
      private static final Collector<Object, ?, Optional<Object>> TO_OPTIONAL =
          Collector.of(
              ToOptionalState::new,
              ToOptionalState::add,
              ToOptionalState::combine,
              ToOptionalState::getOptional,
              Collector.Characteristics.UNORDERED);
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Apr 14 16:07:06 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/MoreCollectors.java

       * collector without breaking j2cl?
       */
      private static final Collector<Object, ?, Optional<Object>> TO_OPTIONAL =
          Collector.of(
              ToOptionalState::new,
              ToOptionalState::add,
              ToOptionalState::combine,
              ToOptionalState::getOptional,
              Collector.Characteristics.UNORDERED);
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Apr 12 15:07:59 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/testing/CollectorTester.java

      private final BiPredicate<? super R, ? super R> equivalence;
    
      private CollectorTester(
          Collector<T, A, R> collector, BiPredicate<? super R, ? super R> equivalence) {
        this.collector = checkNotNull(collector);
        this.equivalence = checkNotNull(equivalence);
      }
    
      /**
       * Different orderings for combining the elements of an input array, which must all produce the
       * same result.
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu May 15 21:47:56 UTC 2025
    - 6.6K bytes
    - Viewed (0)
  7. 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)
  8. android/guava/src/com/google/common/collect/TableCollectors.java

    import java.util.function.Supplier;
    import java.util.stream.Collector;
    import org.jspecify.annotations.Nullable;
    
    /** Collectors utilities for {@code common.collect.Table} internals. */
    @GwtCompatible
    @IgnoreJRERequirement // used only from APIs with Java 8 types in them
    final class TableCollectors {
    
      static <T extends @Nullable Object, R, C, V>
          Collector<T, ?, ImmutableTable<R, C, V>> toImmutableTable(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Apr 14 16:07:06 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/Comparators.java

        checkNonnegative(k, "k");
        checkNotNull(comparator);
        return Collector.of(
            () -> TopKSelector.<T>least(k, comparator),
            TopKSelector::offer,
            TopKSelector::combine,
            TopKSelector::topK,
            Collector.Characteristics.UNORDERED);
      }
    
      /**
       * Returns a {@code Collector} that returns the {@code k} greatest (relative to the specified
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  10. 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)
Back to top