Creating objects with parameters in Java 8 Stream

Viewed 2125

Is it possible to create objects with parameters while using Stream class? I'd like to reproduce the following with Java 8 Stream.

for(Integer id:someCollectionContainingTheIntegers){
     someClass.getList().add(new Whatever(param1, id));
}
3 Answers
Related