concept distinct in category java

This is an excerpt from Manning's book Modern Java in Action: Lambdas, streams, reactive and functional programming.
The last operation in the stream pipeline count returns a long, which is a non-stream value. It’s therefore a terminal operation. All previous operations, filter, distinct, limit, are connected and return a stream. They are therefore intermediate operations.
Streams also support a method called distinct that returns a stream with unique elements (according to the implementation of the hashcode and equals methods of the objects produced by the stream). For example, the following code filters all even numbers from a list and then eliminates duplicates (using the equals method for the comparison). Figure 5.2 shows this visually.
You can filter and slice a stream using the filter, distinct, takeWhile (Java 9), dropWhile (Java 9), skip, and limit methods.

This is an excerpt from Manning's book Java 8 in Action: Lambdas, streams, and functional-style programming.
The last operation in the stream pipeline count returns a long, which is a non-Stream value. It’s therefore a terminal operation. All previous operations, filter, distinct, limit, are connected and return a Stream. They are therefore intermediate operations.
Streams also support a method called distinct that returns a stream with unique elements (according to the implementation of the hashCode and equals methods of the objects produced by the stream). For example, the following code filters all even numbers from a list and makes sure that there are no duplicates. Figure 5.2 shows this visually: