is it possible to cast an Object to e.g. ArrayList<String>
the code below gives an example of the problem. The Problem is in the last row
setDocs((ArrayList<Document>)obj);
where I want to cast an Object obj to ArrayList<String>
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<Document>)obj);
}
objtoArrayList<String>but in the last line u seem to cast toArrayList<Document>