There are utility methods to create ImmutableMap
like Immutable.of(Key, value)
and its overload.
But such methods don't exist for HashMap
or LinkedHashMap
in Maps
class.
Is there any better way to do this or Guava assumes such a map is always a constant map and ImmutableMap
is best option to go with and don't need to provide a utility for HashMap
.