Using a generic class with two generic type parameters