Skip to content
Mahmoud Ben Hassine edited this page Oct 9, 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);

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

// Or

XStream.from(stream)
   .pipe(str())
   .to(stdOut()); // prints "1", "2"
Clone this wiki locally