```handlebars
Map<String, String> map = new HashMap<>();
map.put("beijing", "北京");
map.put("tianjin", "天津");
map.put("xi’an", "西安");
//方法一
// map.entrySet().stream().collect(Collectors.toMap(key->key.getValue(),
// value->value.getKey()));
// System.out.println(map);
//方法二
map.keySet().stream().collect(Collectors.toMap(x->map.get(x),
x->x));
System.out.println(map);