I extends Item gives the warning Item is a raw type. References to Item<D,C> should be parametrized. I tried

I extends Item<D,Category<D,I>>

but this results in the error Bound mismatch: The type Category<D,I> is not a valid substitute for the bounded parameter <C extends Category<D,Item<D,C>>> of the type Item<D,C>. How to I parametrize the interface Category correctly with generics?

mostly. The following declaration is also allowed, but not what we intended

class HerItem implements Item<MyContainer> // nooo!

This is because we relaxed the constraints too much. Well, it's not a really serious problem. Sure, our type system isn't as tight as we want (no type system is), but programmers would instinctively follow the intended constraints, don't go out of their ways to write bizarre stuff just because they can.

Ideally, we would want a This type, and our intended constraints can be expressed as