title: Find and Replace in array lists with help of a map
body: <p>I'm having 2 lists like below.</p>
  
  <pre><code>List&lt;String&gt; list1 = Arrays.asList("I'm a cat", "dog", "There's an elephant and I'm seeing", "we're five");
  
  List&lt;String&gt; list2 = Arrays.asList("I'm", "There's", "we're");
  </code></pre>
  
  <p>and a hash map as below.</p>
  
  <pre><code>"I'm": "I am"
  "we're": "we are"
  "There's": "there is"
  </code></pre>
  
  <p>Here I need to update my <code>list1</code> with the dictionary values. i.e. it should be as</p>
  
  <pre><code>"I am a cat", "dog", "There is an elephant and I am seeing it", "we are five"
  </code></pre>
  
  <p>Here my main problem is the <code>list1</code> that I've provided has close to 80K sentences and the map is of 4k values. Here I'm able to generate all the <code>list1</code> , <code>list2</code> and <code>map</code>. but since it is very huge I'm unable to find an efficient way of doing a find and replace.</p>
  
  <p>I thought of using <code>commons</code> <code>StringUtils.replaceAll()</code> by converting my lists into arrays, but again the issue is I'll need to loop through all the 80k items * 4k times (even more as they are statements rather than single word strings).</p>
  
  <p>How can I do it?</p>