Skip to content
Mahmoud Ben Hassine edited this page Oct 13, 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");

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

// Or

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