We have already seen how a Stream object that represents a source and emits elements can be created. As we have mentioned already, the operations (methods) provided by the Stream interface can be divided into three groups:
- The methods that create a Stream object based on a source.
- Intermediate operations that accept a function and produce a Stream object that emits the same, or modified, values.
- Terminal operations that complete the stream processing, close it, and produce the result.
In this section, we will review the intermediate operations that, in turn, can be grouped by their functionalities.