Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 87 for Collector (0.03 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/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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top