title: java DataBase class
body: <p>I am trying to make some <code>DataBase</code> class. I know that I want each column to be represented as ArrayList. 
  I want to create Constructor as that </p>
  
  <pre><code>DataBase(String[] columnNames, String[] types)
  </code></pre>
  
  <p>so for example </p>
  
  <pre><code>DataBase({"Column1","Column2","Column3"},{"int","string","myOwnType"})
  </code></pre>
  
  <p>I tried to make it with HashMap which will have column name as key and ArrayList as value. </p>
  
  <p>This is what I got so far.</p>
  
  <pre><code>public class DataFrame {
  
      public HashMap&lt;String, ArrayList&gt; data;
      public String[] names;
      public String[] types;
  
      public DataFrame(String[] names, String[] types) {
          data = new HashMap&lt;String, ArrayList&gt;();
          nazwy = new String[_names.length];
          typy = new String[_types.length];
          for(int i = 0; i &lt; _names.length; i++) {
              ArrayList column = new ArrayList&lt;&gt;();
              data.put(_nazwy[i], column);
          }
      }
  }
  </code></pre>
  
  <p>How can I create a column of type given in program? I thought about creating ArrayList and then make Map which will have label and that list, but I cant find how to do that.</p>