-
Notifications
You must be signed in to change notification settings - Fork 15
Mahmoud Ben Hassine edited this page Nov 8, 2015
·
3 revisions
Print line numbers of a stream of Strings.
N/A
Stream<String> stream = Stream.of("a", "b");
UnixStream.unixify(stream)
.nl()
.to(stdOut()); // prints "1 a", "2 b"
// Or
UnixStream.from(stream)
.pipe(nl())
.to(stdOut()); // prints "1 a", "2 b"
UnixStream is created with passion by Mahmoud Ben Hassine