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

tail

Synopsis

Keeps the X last elements from a stream.

Parameters

Name Type Mandatory Default
size int No 10

Example

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

UnixStream.unixify(stream)
   .tail(1)
   .to(stdOut()); // prints "b"

// Or

UnixStream.from(stream)
   .pipe(tail(1))
   .to(stdOut()); // prints "b"
Clone this wiki locally