Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34179 > unrolled thread

stream zip iterating with 3 streams

Started byPhilipp Kraus <philipp.kraus.flashpixx@gmail.com>
First post2016-04-22 00:30 -0700
Last post2016-04-22 23:10 +0200
Articles 2 — 2 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  stream zip iterating with 3 streams Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-04-22 00:30 -0700
    Re: stream zip iterating with 3 streams Sebastian <news@seyweiler.dyndns.org> - 2016-04-22 23:10 +0200

#34179 — stream zip iterating with 3 streams

FromPhilipp Kraus <philipp.kraus.flashpixx@gmail.com>
Date2016-04-22 00:30 -0700
Subjectstream zip iterating with 3 streams
Message-ID<124daa3b-ae94-4e53-9c1b-558e0ced8712@googlegroups.com>
Hello,

I'm using StreamUtils.zip for iterating over two streams. I need this zip operation also for 3 streams, but I find a solution for two streams only. Did anyone know how to solve this, I would like to prefer:

Stream.zip3(
    streamA,
    streamB,
    streamC,
    (a, b, c) -> {}
);

Did you create an example or did you know an useful package

Thanks

Phil

[toc] | [next] | [standalone]


#34184

FromSebastian <news@seyweiler.dyndns.org>
Date2016-04-22 23:10 +0200
Message-ID<nfe40o$1tb$1@news.albasani.net>
In reply to#34179
Am 22.04.2016 09:30, schrieb Philipp Kraus:
> Hello,
>
> I'm using StreamUtils.zip for iterating over two streams. I need this zip operation also for 3 streams, but I find a solution for two streams only. Did anyone know how to solve this, I would like to prefer:
>
> Stream.zip3(
>      streamA,
>      streamB,
>      streamC,
>      (a, b, c) -> {}
> );
>
> Did you create an example or did you know an useful package
>
> Thanks
>
> Phil
>
You don't mention what StreamUtils you use. But the one in Protonpack 
(https://github.com/poetix/protonpack) has exactly what you want:
com.codepoetics.protonpack.StreamUtils#zip/3

-- Sebastian

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web