title: Comparing a Hashmap with Array
body: <p>I am new to Java Programming and Hashmaps and I have a problem that I need help with.</p>
  
  <p>I have a Hashmap that stores a collection of objects:</p>
  
  <pre><code>private HashMap &lt;String, Turtle&gt; turtles = new HashMap&lt;String, Turtle&gt;();
  </code></pre>
  
  <p>I also have a collection of shapes which I have added to the Turtle class:</p>
  
  <pre><code>ArrayList&lt;String&gt; shapes = new ArrayList&lt;String&gt;();
  </code></pre>
  
  <p>What I am trying to do is find a way so that it adds the shape object with a specified name to the turtle object with a specified name by passing the parameters of <code>String turtleName</code> and <code>String shapeName</code>.</p>
  
  <p>I do not know how to go about this with a ArrayList and a Hashmap.</p>