Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for flatMap (0.16 sec)

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

        concatenated.close();
        assertThat(closeCountB.get()).isEqualTo(1);
      }
    
      public void testConcat_refStream_closeIsPropagated_Stream_flatMap() {
        // Just to demonstrate behavior of Stream::flatMap in the standard library
        AtomicInteger closeCountB = new AtomicInteger(0);
        Stream<String> streamB = Stream.of("b").onClose(closeCountB::incrementAndGet);
        Stream<String> concatenated =
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 20K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/CollectSpliterators.java

          Spliterator<OutElementT> flatMap(
              Spliterator<InElementT> fromSpliterator,
              Function<? super InElementT, @Nullable Spliterator<OutElementT>> function,
              int topCharacteristics,
              long topSize) {
        checkArgument(
            (topCharacteristics & Spliterator.SUBSIZED) == 0,
            "flatMap does not support SUBSIZED characteristic");
        checkArgument(
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 15:21:23 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ImmutableBiMapFloodingTest.java

    @GwtIncompatible
    public class ImmutableBiMapFloodingTest extends AbstractHashFloodingTest<BiMap<Object, Object>> {
      public ImmutableBiMapFloodingTest() {
        super(
            EnumSet.allOf(ConstructionPathway.class).stream()
                .flatMap(
                    path ->
                        Stream.<Construction<BiMap<Object, Object>>>of(
                            keys ->
                                path.create(
                                    Lists.transform(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 21:01:39 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  4. guava/src/com/google/common/base/Optional.java

     * relevant methods below.
     *
     * <ul>
     *   <li>This class is serializable; {@code java.util.Optional} is not.
     *   <li>{@code java.util.Optional} has the additional methods {@code ifPresent}, {@code filter},
     *       {@code flatMap}, and {@code orElseThrow}.
     *   <li>{@code java.util} offers the primitive-specialized versions {@code OptionalInt}, {@code
     *       OptionalLong} and {@code OptionalDouble}, the use of which is recommended; Guava does not
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/FluentIterable.java

       * iterator supports it.
       *
       * <p><b>{@code Stream} equivalent:</b> to concatenate an arbitrary number of streams, use {@code
       * Stream.of(stream1, stream2, ...).flatMap(s -> s)}. If the sources are iterables, use {@code
       * Stream.of(iter1, iter2, ...).flatMap(Streams::stream)}.
       *
       * @throws NullPointerException if any of the provided iterables is {@code null}
       * @since 20.0
       */
      @SafeVarargs
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jan 30 00:14:39 GMT 2024
    - 35.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Iterables.java

       * Iterables.concat(Collections.nCopies(n, iterable))}
       *
       * <p><b>Java 8+ users:</b> The {@code Stream} equivalent of this method is {@code
       * Stream.generate(() -> iterable).flatMap(Streams::stream)}.
       */
      public static <T extends @Nullable Object> Iterable<T> cycle(final Iterable<T> iterable) {
        checkNotNull(iterable);
        return new FluentIterable<T>() {
          @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/base/Optional.java

     * relevant methods below.
     *
     * <ul>
     *   <li>This class is serializable; {@code java.util.Optional} is not.
     *   <li>{@code java.util.Optional} has the additional methods {@code ifPresent}, {@code filter},
     *       {@code flatMap}, and {@code orElseThrow}.
     *   <li>{@code java.util} offers the primitive-specialized versions {@code OptionalInt}, {@code
     *       OptionalLong} and {@code OptionalDouble}, the use of which is recommended; Guava does not
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 13K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Iterables.java

       * Iterables.concat(Collections.nCopies(n, iterable))}
       *
       * <p><b>Java 8+ users:</b> The {@code Stream} equivalent of this method is {@code
       * Stream.generate(() -> iterable).flatMap(Streams::stream)}.
       */
      public static <T extends @Nullable Object> Iterable<T> cycle(final Iterable<T> iterable) {
        checkNotNull(iterable);
        return new FluentIterable<T>() {
          @Override
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/CollectSpliteratorsTest.java

            .expect("A", "B", "C", "D", "E");
      }
    
      public void testFlatMap() {
        SpliteratorTester.of(
                () ->
                    CollectSpliterators.flatMap(
                        Arrays.spliterator(new String[] {"abc", "", "de", "f", "g", ""}),
                        (String str) -> Lists.charactersOf(str).spliterator(),
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 4K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/ImmutableMultimap.java

             */
            return immutableEntry(requireNonNull(currentKey), valueItr.next());
          }
        };
      }
    
      @Override
      Spliterator<Entry<K, V>> entrySpliterator() {
        return CollectSpliterators.flatMap(
            asMap().entrySet().spliterator(),
            keyToValueCollectionEntry -> {
              K key = keyToValueCollectionEntry.getKey();
              Collection<V> valueCollection = keyToValueCollectionEntry.getValue();
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 25.6K bytes
    - Viewed (0)
Back to top