I\'m trying to do something like this:
Stream stream = IntStream.of(...) .flatMapToObj(i -> getStreamOfObjects(i));
Using a boxed stream would work if you don't mind the cost of boxing each int value.
int
Stream stream = IntStream.of(...).boxed().flatMap(i -> getStreamOfObjects(i));