I have a map, containing strings as a key and ArrayList as values. I want to use stream api to get as a result all the Arrays from values as one array.
Map<Integer, ArrayList<String>> map = new HashMap<>();
Result: one ArrayList<String> containing all the Strings from value arrays and preferably unique values.
.flatMap(a -> a.stream())but the method reference in this case is better