I\'m porting a piece of code from .NET to Java and stumbled upon a scenario where I want to use stream to map & reduce.
class Content { private String
You can use proper lambda for BinaryOperator in reduce function.
Content c = contentList .stream() .reduce((t, u) -> new Content( t.getA() + ',' + u.getA(), t.getB() + ',' + u.getB(), t.getC() + ',' + u.getC()) ).get();