This group includes arguably the most important intermediate operations. They are the only intermediate operations that modify the elements of the stream. They map (transform) the original stream element value to a new one:
- Stream<R> map(Function<T, R> mapper): Applies the provided function to each element of the T type of this stream, and produces a new element value of the R type.
- IntStream mapToInt(ToIntFunction<T> mapper): Converts this stream to an IntStream of the Integer values.
- LongStream mapToLong(ToLongFunction<T> mapper): Converts this stream to a LongStream of the Long values.
- DoubleStream mapToDouble(ToDoubleFunction<T> mapper): Converts this stream to a DoubleStream of the Double values.
- Stream<R> flatMap(Function<T, ...