不保证顺序
Map<String, List<Stu>> map = list.stream().collect(Collectors.groupingBy(e -> getKey(e.getA(), e.getB())));
保证顺序
package com.google.gson.internal
Map<String, List<Stu>> keyToListMap = list.stream().collect(Collectors.groupingBy(e -> getKey(e.getA(), e.getB()), LinkedHashTreeMap::new, Collectors.toCollection(ArrayList::new)));