I faced following problem. I have a list of lists which i simply want to retainAll. I\'m trying to do with streams
private List> ids =
addAll returns a boolean, not the union of the two lists. You want
List reduce = ids.stream().reduce(ids.get(0), (a, b) -> { a.addAll(b); return a; });