String to HashMap JAVA

后端 未结 10 1339
我寻月下人不归
我寻月下人不归 2020-12-02 11:32

I have a Java Property file and there is a KEY as ORDER. So I retrieve the VALUE of that KEY using the getProperty(

10条回答
  •  忘掉有多难
    2020-12-02 12:03

    You can do that with Guava's Splitter.MapSplitter:

    Map properties = Splitter.on(",").withKeyValueSeparator(":").split(inputString);
    

提交回复
热议问题