title: Convert ArrayList to HashMap<String, String>
body: <p>I have this <code>ArrayList</code></p>
  <pre><code>public ArrayList&lt;HashMap&lt;String, String&gt;&gt; xmlFileNames = new ArrayList&lt;&gt;();
  </code></pre>
  <p>and I want to convert this to:</p>
  <pre><code>HashMap&lt;String, String&gt; comparemap2 = new HashMap&lt;&gt;();
  </code></pre>
  <p>What I want is: I want all the Items inside the ArrayList and want to put them into the HashMap
  My HashMap looks like:</p>
  <blockquote>
  <p>KEY             VALUE</p>
  <p>job_id   032014091029309130921.xml</p>
  <p>job_id 201302149014021492929.xml</p>
  <p>job_id 203921904901920952099.xml</p>
  </blockquote>
  <p><strong>EDIT:</strong>
  Later I want to compare this map with an existing map:</p>
  <pre><code>Properties properties = new Properties();
              try {
                  properties.load(openFileInput(&quot;comparexml.kx_todo&quot;));
              } catch (IOException e) {
                  e.printStackTrace();
              }
              for (String key : properties.stringPropertyNames()) {
                  compareMap.put(key, properties.get(key).toString());
              }
  HashMap&lt;String, String&gt; oldCompareMap = new HashMap&lt;&gt;();
              for (HashMap key : xmlFileNames) {
                  oldCompareMap.putAll(key);
              }
              isEqualMaps(oldCompareMap, compareMap);
  </code></pre>
  <p>I only want to compare, if the filename exists in the <code>compareMap</code>. If not, than add it to the <code>xmlFileName</code> Map</p>
  <p>I've looked up in StackOverFlow, how I can convert ArrayList to HashMap. But the other Threads treat data types like <code>Item</code> or <code>Product</code>.</p>
  <p>I hope you can help me!</p>
  <p>Kind Regards</p>