I want to implement a function with signature
static boolean checkAnyOutOfBoundary(int[] index,ArrayList<ArrayList<T>> list)
Where I want to substitute T with other self-created class(DocScore). I tried to substitute T with Object. But when I try to instantiate the list instance, like
ArrayList<ArrayList<Object>> DocScoreList = new ArrayList<ArrayList<Object>>();
for (int i = 0; i < index.length; i++)
DocScoreList.add(root.children.get(i).docList);
The type of root.children.get(i).docList is ArrayList<DocScore>
I can not add element into DocScoreList. Does anybody know how can I implement this?
root.children.get(i).docList, is anArrayList<Object>?static boolean <T> check...public class SomeClass<T>...