To better understand the new stream API I\'m trying to convert some old code, but I\'m stuck on this one.
public Collection extends File> asDestSet(
Use flatMap:
return map.values().stream().flatMap(Set::stream).collect(Collectors.toSet());
The flatMap flattens all of your sets into single stream.
flatMap