title: cast object to ArrayList<String>
body: <p>is it possible to cast an <code>Object</code> to e.g. <code>ArrayList&lt;String&gt;</code> </p>
  
  <p>the code below gives an example of the problem. The Problem is in the last row</p>
  
  <pre><code>setDocs((ArrayList&lt;Document&gt;)obj);
  </code></pre>
  
  <p>where I want to cast an <code>Object obj</code> to <code>ArrayList&lt;String&gt;</code></p>
  
  <pre><code>public void setValue(Object obj)
      {
          if(obj instanceof TFile)
              setTFile((TFile)obj);
          else
              if(obj instanceof File)
                  setFile((File)obj));
              else
                  if(obj instanceof Document)
                      setDoc((Document)obj);
                  else
                      if(obj instanceof ArrayList)
                          setDocs((ArrayList&lt;Document&gt;)obj);
  
      }
  </code></pre>