Skip to content

Instantly share code, notes, and snippets.

@m0wfo
Created May 23, 2016 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m0wfo/24b184b37af96525262c4e0e5d629eb1 to your computer and use it in GitHub Desktop.
Save m0wfo/24b184b37af96525262c4e0e5d629eb1 to your computer and use it in GitHub Desktop.
ImmutableMap<String, String> foo = ...
// take foo, add 'new' => 'kvp'
ImmutableMap<String, String> bar = ImmutableMap
.builder()
.addAll(foo)
.put("new", "kvp")
.build();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment