title: Java 8 Stream: Populating a list of objects instantiated using values in a HashMap
body: <p>So I have a HashMap of key-value pairs and would like to create a list of new objects instantiated using each key-value pair. For example:</p>
  
  <pre><code>//HashMap of coordinates with the key being x and value being y
  Map&lt;Integer, Integer&gt; coordinates = new HashMap&lt;Integer, Integer&gt;();
  coordinates.put(1,2);
  coordinates.put(3,4);
  
  List&lt;Point&gt; points = new ArrayList&lt;Point&gt;();
  
  //Add points to the list of points instantiated using key-value pairs in HashMap
  for(Integer i : coordinates.keySet()){
       points.add(new Point(i , coordinates.get(i)));
  }
  </code></pre>
  
  <p>How could I go about doing this same thing using Java 8 streams.</p>