TreeMap<Long, String> treeMap = new TreeMap<>();
TreeMap<Long, String> map = treeMap.entrySet().stream()
.collect(Collectors.toMap(entry -> entry.getKey(), entry -> entry.getValue(), (oldValue, newValue) -> newValue, TreeMap::new));
分别设置map的k,v,key冲突后的取值策略,生成的map类型