-
Notifications
You must be signed in to change notification settings - Fork 15
head
Mahmoud Ben Hassine edited this page Nov 8, 2015
·
3 revisions
Keeps the X first elements from a stream.
Name | Type | Mandatory | Default |
---|---|---|---|
size | int | No | 10 |
Stream<String> stream = Stream.of("a", "b");
UnixStream.unixify(stream)
.head(1)
.to(stdOut()); // prints "a"
// Or
UnixStream.from(stream)
.pipe(head(1))
.to(stdOut()); // prints "a"
UnixStream is created with passion by Mahmoud Ben Hassine