Let's say I have the following classes Animal
, Fish
, and CatFish
.
CatFish
extends Fish
and Fish
extends Animal
.
There is a generic class called MyPets
, which has a type parameter (generic) called T
, and that will be parameterized with the above classes' objects.
My question is, how do I create a lower bounded method in D
that will take any objects that is a PARENT class of the CatFish
class.