Skip to content
Mahmoud Ben Hassine edited this page Nov 21, 2015 · 4 revisions

str

Synopsis

Transforms a stream of objects into a stream of Strings by calling toString on each object.

Parameters

N/A

Example

Stream<String> stream = Stream.of(1, 2);

UnixStream.unixify(stream)
   .str()
   .to(stdOut()); // prints "1", "2"

// Or

UnixStream.from(stream)
   .pipe(str())
   .to(stdOut()); // prints "1", "2"

// Or

stream
    .map(Functions.str())
    .forEach(System.out::println); // prints "1", "2"
Clone this wiki locally