Skip to content
Mahmoud Ben Hassine edited this page Nov 8, 2015 · 3 revisions

uniq

Synopsis

Remove duplicates from a stream.

This is an alias for distinct.

Parameters

N/A

Example

Stream<String> stream = Stream.of("a", "a", "b");

UnixStream.unixify(stream)
   .uniq()
   .to(stdOut()); // prints "a", "b"

// Or

UnixStream.from(stream)
   .pipe(uniq())
   .to(stdOut()); // prints "a", "b"
Clone this wiki locally