This group includes operations that remove duplicates, skip some of the elements, and limit the number of processed elements, only selecting those that are needed:
- Stream<T> distinct(): Compares stream elements using the Object.equals(Object) method, and skips the duplicates.
- Stream<T> skip(long n): Ignores the provided number of stream elements that are emitted first.
- Stream<T> limit(long maxSize): Allows only the provided number of stream elements to be processed.
- Stream<T> filter(Predicate<T> predicate): Allows only those elements that result in true (when processed by the provided Predicate function).
- Default Stream<T> dropWhile(Predicate<T> predicate): Skips the first elements of the stream that result in true when processed ...