1

I want to do this:

Foo[] foos = new Foo[6];
Blah[] blahs = new Blah[6];
.....

 Arrays.stream(foos)
       .mapIndex((Foo foo,int index) ->  "" + foo[index] +  blahs[index])
        .collect(...)

Is there any standard way to do this? Maybe a standard jdk map "mapindex" function?

jack
  • 1,861
  • 4
  • 31
  • 52
  • 2
    An emerging idiom seems to be to run the stream over the indexes. See [this answer](http://stackoverflow.com/a/18563928/1441122). For rationale see [this question and its answers](http://stackoverflow.com/q/22789413/1441122). – Stuart Marks Jul 31 '14 at 15:32

0 Answers0