title: Generics & Types
body: <p>I am using generics in a certain data structure. I have to store <code>int x</code>, <code>int y</code>, and <code>Value value</code>, where <code>value</code> is the generic type.</p>
  
  <p>I am trying to group all those in one object called <code>NodeData</code> and then in another class, create an ArrayList of <code>NodeData</code>'s, (so each element in the array list will include hold an x, y and value.</p>
  
  <p>My <code>NodeData</code> is as follows:</p>
  
  <pre><code>public class NodeData&lt;Value&gt; {
  
      private int x;
      private int y;
      private Value value;
  </code></pre>
  
  <p>In another class, the array list instantiated as follows: <code>ArrayList&lt;NodeData&gt; items = new ArrayList&lt;NodeData&gt;();</code>.</p>
  
  <p>I am getting an error for the array list which says: <code>NodeData is a raw type. References to NodeData&lt;Value&gt; should be parametrized.</code> Why is that? <code>NodeData</code> is already parametrized as <code>NodeData&lt;Value&gt;</code>.</p>
  
  <p>Thanks</p>