Package it.tidalwave.util
Class StreamUtils
- java.lang.Object
- 
- it.tidalwave.util.StreamUtils
 
- 
 public final class StreamUtils extends java.lang.ObjectA collection of operations onStreams.- Since:
- 3.2-ALPHA-12
- Author:
- Fabrizio Giudici
- Status: draft API
 
- 
- 
Constructor SummaryConstructors Constructor Description StreamUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.stream.Stream<java.time.LocalDateTime>randomLocalDateTimeStream(long seed, java.time.LocalDateTime from, java.time.LocalDateTime to)Returns aStreamof randomLocalDateTimes, in the given range.static <A,B>
 java.util.stream.Stream<Pair<A,B>>zip(java.util.stream.Stream<? extends A> streamA, java.util.stream.Stream<? extends B> streamB)Zips two streams.static <A,B,R>
 java.util.stream.Stream<R>zip(java.util.stream.Stream<? extends A> streamA, java.util.stream.Stream<? extends B> streamB, java.util.function.BiFunction<? super A,? super B,? extends R> zipper)Zips two streams.
 
- 
- 
- 
Method Detail- 
zip@Nonnull public static <A,B> java.util.stream.Stream<Pair<A,B>> zip(@Nonnull java.util.stream.Stream<? extends A> streamA, @Nonnull java.util.stream.Stream<? extends B> streamB) Zips two streams.- Type Parameters:
- A- the type of elements of the first- Stream
- B- the type of elements of the second- Stream
- Parameters:
- streamA- the first- Stream
- streamB- the second- Stream
- Returns:
- the zipped StreamofPairs
- Since:
- 3.2-ALPHA-20
- See Also:
- zip(Stream, Stream, BiFunction)
 
 - 
zip@Nonnull public static <A,B,R> java.util.stream.Stream<R> zip(@Nonnull java.util.stream.Stream<? extends A> streamA, @Nonnull java.util.stream.Stream<? extends B> streamB, @Nonnull java.util.function.BiFunction<? super A,? super B,? extends R> zipper)Zips two streams.- Type Parameters:
- A- the type of elements of the first- Stream
- B- the type of elements of the second- Stream
- R- the type of elements of the zipped- Stream
- Parameters:
- streamA- the first- Stream
- streamB- the second- Stream
- zipper- the zipping function
- Returns:
- the zipped Stream
- Since:
- 3.2-ALPHA-12
- See Also:
- zip(Stream, Stream)
 
 - 
randomLocalDateTimeStream@Nonnull public static java.util.stream.Stream<java.time.LocalDateTime> randomLocalDateTimeStream(long seed, @Nonnull java.time.LocalDateTime from, @Nonnull java.time.LocalDateTime to)Returns aStreamof randomLocalDateTimes, in the given range.- Parameters:
- seed- the random seed
- from- the lower bound of the range (included)
- to- the upper bound of the range (excluded)
- Returns:
- the stream
- Since:
- 3.2-ALPHA-19
 
 
- 
 
-