List<String> menuPathlist = new ArrayList<String>();
List<String> menuIds = menuPathlist.stream().map(line -> line.split("/")).flatMap(Arrays::stream)
.distinct().collect(Collectors.toList());
List<String> menuPathlist = new ArrayList<String>();
List<String> menuIds = menuPathlist.stream().map(line -> line.split("/")).flatMap(Arrays::stream)
.distinct().collect(Collectors.toList());
转载于:https://www.cnblogs.com/merseyalma/p/9481109.html