Created
October 11, 2011 02:04
-
-
Save dtulig/1277093 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Map<String, String> input = new HashMap<String, String>() {{ | |
put("param", "v"); | |
put("p2", "v2"); | |
put("q", "java"); | |
}}; | |
final String result = Joiner.on("&") | |
.withKeyValueSeparator("=") | |
.join(input); | |
// Result: "p2=v2¶m=v&q=java" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment