This is very wrong. You don't have a K[] array, you have a Object[] array. This will end up being a class cast exception if it ever escapes the confines of this class (type erasure saves you internally). The same goes for all the other arrays like this that were changed from Object[] to be generically typed.