我想从
MultiMap<String, String> byState = ArrayListMultimap.create();
multiMap.put("california", "San Jose");
multiMap.put("california", "San Diego");
multiMap.put("california", "San Francisco");
multiMap.put("Texas", "Austin");
至
Map<String, Integer> numberOfCitiesByState = Maps.immutableEntry("california",3).immutableEntry("Texas", 1).build()
是否有任何 guava api 可以优雅地做到这一点?
谢谢,拉维