title: Java List parameterized?
body: <p>I am quite new to Java ... 
  I wrote a class called DLPFile 
  which is basically a container of other objects like Strings, ints, floats, etc.</p>
  
  <p>When putting my files into a List and then saving it in my session (which is from Map class) variable is easy;</p>
  
  <pre><code>DLPFile file = new DLPFile();
  List &lt;DLPFile &gt;fileList =  new ArrayList &lt;DLPFile&gt;();
  fileList.add(file);
  session.put("filesList", fileList);
  </code></pre>
  
  <p>but how do I retrieve the list from the session var?
  When I do:</p>
  
  <pre><code>List &lt;DLPFile files = (List) session.get("fileslist");
  </code></pre>
  
  <p>I got some warnings:</p>
  
  <pre><code>"List is a raw type.References to generic type List&lt;E&gt; should be parameterized."
  </code></pre>
  
  <p>I tried</p>
  
  <pre><code>List &lt;DLPFile files = (List &lt;DLPFile&gt; ) session.get("fileslist");   
  List &lt;DLPFile files = (List ) session.get("fileslist")&lt;DLPFile&gt;; and
  List &lt;DLPFile files = (List) &lt;DLPFile&gt;  session.get("fileslist");
  </code></pre>
  
  <p>but none works</p>
  
  <p>I suppose this is kind of a "casting" problem... (maybe?)</p>
  
  <p>Thanks in advance ;)</p>