-
Notifications
You must be signed in to change notification settings - Fork 15
uniq
Mahmoud Ben Hassine edited this page Oct 9, 2015
·
3 revisions
Remove duplicates from a stream.
N/A
Stream<String> stream = Stream.of("a", "a", "b");
XStream.unixify(stream)
.uniq()
.to(stdOut()); // prints "a", "b"
// Or
XStream.from(stream)
.pipe(uniq())
.to(stdOut()); // prints "a", "b"
UnixStream is created with passion by Mahmoud Ben Hassine