@Test void flattenShouldPreserveSingleStreams() { assertThat( StreamUtils.flatten(ImmutableList.of( Stream.of(1, 2, 3))) .collect(Guavate.toImmutableList())) .containsExactly(1, 2, 3); }
public static <T> Stream<T> flatten(Collection<Stream<T>> streams) { return flatten(streams.stream()); }
StreamUtils { public static <T> Stream<T> flatten(Collection<Stream<T>> streams) { return flatten(streams.stream()); } }
StreamUtils { public static <T> Stream<T> flatten(Collection<Stream<T>> streams) { return flatten(streams.stream()); }  }
StreamUtils { public static <T> Stream<T> flatten(Collection<Stream<T>> streams) { return flatten(streams.stream()); }  @SafeVarargs static Stream<T> ofNullables(T... array); static Stream<T> ofNullable(T[] array); static Stream<T> ofOptional(Optional<T[]> array); static Stream<T> flatten(Collection<Stream<T>> streams); static Stream<T> flatten(Stream<Stream<T>> streams); @SafeVarargs static Stream<T> flatten(Stream<T>... streams); static Stream<T> unfold(T seed, Function<T, Optional<T>> generator); static Stream<T> iterate(T seed, Long limit, Function<T, Stream<T>> generator); }
StreamUtils { public static <T> Stream<T> flatten(Collection<Stream<T>> streams) { return flatten(streams.stream()); }  @SafeVarargs static Stream<T> ofNullables(T... array); static Stream<T> ofNullable(T[] array); static Stream<T> ofOptional(Optional<T[]> array); static Stream<T> flatten(Collection<Stream<T>> streams); static Stream<T> flatten(Stream<Stream<T>> streams); @SafeVarargs static Stream<T> flatten(Stream<T>... streams); static Stream<T> unfold(T seed, Function<T, Optional<T>> generator); static Stream<T> iterate(T seed, Long limit, Function<T, Stream<T>> generator);  }