You can do that with Guava’s Splitter.MapSplitter:
Map<String, String> properties = Splitter.on(",")
.withKeyValueSeparator(":")
.split(inputString);
More Related Contents:
- How can I convert JSON to a HashMap using Gson?
- How to sort Map values by key in Java?
- What is the difference between the HashMap and Map objects in Java?
- HashMap Java 8 implementation
- HashMap to return default value for non-found keys?
- How can I sort Map values by key in Java?
- Sorting the Map in descending order based on the value [duplicate]
- How to put HashMap into different elements with same key
- What are the differences between a HashMap and a Hashtable in Java?
- How to loop through a HashMap in JSP?
- Sort a Map by values
- Is a HashMap thread-safe for different keys?
- What is the significance of load factor in HashMap?
- Why there is no ConcurrentHashSet against ConcurrentHashMap
- Can an array be used as a HashMap key?
- Sorting hashmap based on keys
- What is the optimal capacity and load factor for a fixed-size HashMap?
- HashMap implementation in Java. How does the bucket index calculation work?
- Data structures that can map a range of keys to a value
- Java invert map
- How can I iterate over a map of ?
- Java: how to convert HashMap to array
- Memory overhead of Java HashMap compared to ArrayList
- How to create a HashMap with two keys (Key-Pair, Value)?
- In Java8 functional style, how can i map the values to already existing key value pair
- Collision resolution in Java HashMap
- Convert string representing key-value pairs to Map
- In Java 8 how do I transform a Map to another Map using a lambda?
- What is the Java equivalent of Objective-C’s NSDictionary?
- Consumer mapped Class in HashMap