Guava provides us with great factory methods for Java types, such as Maps.newHashMap().
But are there also builders for java Maps?
HashM
There is no such thing for HashMaps, but you can create an ImmutableMap with a builder:
final Map m = ImmutableMap.builder().
put("a", 1).
put("b", 2).
build();
And if you need a mutable map, you can just feed that to the HashMap constructor.
final Map m = Maps.newHashMap(
ImmutableMap.builder().
put("a", 1).
put("b", 2).
build());