-
Notifications
You must be signed in to change notification settings - Fork 253
Open
Labels
Description
It's possible to change some StreamEx method signatures to avoid explicit boxing call for parameter:
append(Stream<? extends T>) -> append(BaseStream<? extends T, ?>)
prepend(Stream<? extends T>) -> prepend(BaseStream<? extends T, ?>)
[Implemented] zipWith(Stream<V>[, BiFunction]) -> zipWith(BaseStream<V, ?>[, BiFunction])
headTail(BiFunction<? super T, ? super StreamEx<T>, ? extends Stream<R>>) ->
headTail(BiFunction<? super T, ? super StreamEx<T>, ? extends BaseStream<R, ?>>)
headTail(BiFunction<? super T, ? super StreamEx<T>, ? extends Stream<R>> mapper,
Supplier<? extends Stream<R>> supplier) ->
headTail(BiFunction<? super T, ? super StreamEx<T>, ? extends BaseStream<R, ?>> mapper,
Supplier<? extends BaseStream<R, ?>> supplier)
Also MoreCollectors method:
flatMapping(Function<? super T, ? extends Stream<? extends U>> mapper
[, Collector<? super U, A, R> downstream]) ->
flatMapping(Function<? super T, ? extends BaseStream<? extends U, ?>> mapper
[, Collector<? super U, A, R> downstream])
This change will allow to skip .boxed() call in some cases. E.g.:
StreamEx.of("a", "b", "c").zipWith(IntStreamEx.ints())...
This change breaks binary compatibility (recompilation will be necessary), so cannot be introduced in patch release.