title: How to get values and keys from HashMap?
body: <p>I'm writing a simple edit text in Java. When the user opens it, a file will be opened in <code>JTabbedPane</code>. I did the following to save the files opened:</p>
  
  <p><code>HashMap&lt;String, Tab&gt; hash = new HashMap&lt;String, Tab&gt;();</code></p>
  
  <p>Where <code>Tab</code> will receive the values, such as: <code>File file, JTextArea container, JTabbedPane tab</code>.</p>
  
  <p>I have a class called <code>Tab</code>:</p>
  
  <pre><code>public Tab(File file, JTextArea container, JTabbedPane tab)
  {
      this.file = file;
      this.container = container;
      this.tab = tab;
      tab.add(file.getName(), container);
      readFile();
  }
  </code></pre>
  
  <p>Now, in this <code>SaveFile</code> class, I need get the <code>Tab</code> values stored in the <code>HashMap</code>. How can I do that?</p>