import java.util.ArrayList; import java.util.Map; import java.util.Set; class Test { { Map> myMap = null; myMap.entrySet().parallelStream() .map(it -> { final ArrayList myList = newArrayList(it.getValue()); return myList.size(); }) .forEach(System.out::println); } public static ArrayList newArrayList(Iterable elements) { return null; } }