The code in the Java collections api will not compile cleanly. They get warnings as well. You don't see a warning because with the JDK, you already have the .class files (or a .jar) that has the compiled code.
For your own code, just use a list of linked lists:
TestClass<T> { ...
List<LinkedList<T>> listOfLists; ...
listOfLists = new ArrayList<LinkedList<T>>(capacity);