. , " " " ":
... , , visibility - , , . , . , (, IntStream.range(0,5).parallel().map(x -> x*2).toArray() [0, 2, 4, 6, 8]), , -
, , AtomicInteger, . , .. List s Bar List, int, , ( , ).
forEachOrdered , . .
, ,
public List<Foo> getFoos(List<Bar> bars) {
return IntStream.range(0, bars.size())
.mapToObj(idx -> bazUtils.getFoo(bars.get(idx), idx+1))
.collect(Collectors.toList());
}