title: List of HashMaps Java
body: <pre><code>Map&lt;String, List&lt;String&gt;&gt; words = new HashMap&lt;String, List&lt;String&gt;&gt;();
              List&lt;Map&gt; listOfHash = new ArrayList&lt;Map&gt;();
  
              for (int temp = 0; temp &lt; nList.getLength(); temp++) {
                  Node nNode = nList.item(temp);
                  if (nNode.getNodeType() == Node.ELEMENT_NODE) {
                      Element eElement = (Element) nNode;
                      String word = getTagValue("word", eElement);
                      List&lt;String&gt; add_word = new ArrayList&lt;String&gt;();
                      String pos = getTagValue("POS", eElement);
                      if(words.get(pos)!=null){
                          add_word.addAll(words.get(pos));
                          add_word.add(word);
                      }
                      else{
                          add_word.add(word);
                      }
                      words.put(pos, add_word);
                  }
              }
  </code></pre>
  
  <p>This is a segment of code I have written (it uses Stanford CoreNLP). The problem I am facing is that presently this code is working only with one Map i.e. "words". Now, I want that as soon as the parser sees "000000000" which is my delimiter, then a new Map should be added to the List and then the keys and values to be inserted into it. If it does not see "000000000", then the Keys and Values are to be added in the same Map.
  Please help me with that as I am not able to do it even after a lot of efforts.</p>