What's the easiest way to convert an ArrayList to ArrayList<Type> without the "unchecked or unsafe operations" warning? More specifically, what's the easiest way to deal with the situation below?
public static void doStuff(ArrayList... a) {
// stuff
}
I want to be able to call the method with any number of parameters, which means a will be an array and so I can't specify the type. So unless there's an alternate solution, I have an array of ArrayLists that I need to convert into ArrayList<Type>.
@SuppressWarning("unchecked")// stuffdoes.