probably not  i spent like a half an hour trying to get those generics to work but java generics are an awful hack  if you look into arraylist implementation you will see that they use object data to store elements as well  this is related to the fact that you cannot do new v size  in java when v is a template parameter 