title: Java Beginner: How to access a Hashmap of SortedSet entries?
body: <p>I'm taking a java class and the instructor has had us build a HashMap like this: </p>
  
  <pre><code>Map&lt;String, SortedSet&lt;Car&gt;&gt; makeSetMap = new HashMap&lt;String, SortedSet&lt;Car&gt;&gt;();
  </code></pre>
  
  <p>The Car objects are read in from a file of cars (like <code>Toyota Corolla 8 90000</code>) and do some processing to get them into the Hashmap as described above.  So the map's key is a string which ends up being a manufacturer name (Toyota) and then the values are SortedSet of Cars.</p>
  
  <p>Later in the app i'm supposed to set it up so a user can select which model he wants to have displayed and then it will display just car data that are from that model.  Right now I'm just stuck on figuring how to access all the data in the whole thing.  I've written some code for the Hashmap and I can get the Manufacturer names to display with an iterator, but I can't figure out how to display the individual car data.  :(</p>
  
  <p>Here's what I have so far - it's a snippet, but I think you guys can figure it out: </p>
  
  <pre><code>    //I'm starting to have trouble here..
      Set&lt;String&gt; brands = makeSetMap.keySet();
      System.out.println("Brands are: " + brands.toString());
      Iterator&lt;String&gt; brandsIt = brands.iterator();
  
      while (brandsIt.hasNext())
      {
          SortedSet&lt;Car&gt; brandmodels;
          //brandmodels = brandsIt.next();
          //System.out.println("Working on: " +brandmodels.toString());
  
      }
  </code></pre>
  
  <p>Help!  Thanks to anyone who can straighten me out.</p>