The following is a modified version of the explanation from the book Java Generics and Collections:
We have an Enum
declared
enum Season { WINTER, SPRING, SUMMER, FALL }
which will be expanded to a class
final class Season extends ...
where ...
is to be the somehow-parameterised base class for Enums. Let's work
out what that has to be. Well, one of the requirements for Season
is that it should implement Comparable<Season>
. So we're going to need
Season extends ... implements Comparable<Season>
What could you use for ...
that would allow this to work? Given that it has to be a parameterisation of Enum
, the only choice is Enum<Season>
, so that you can have:
Season extends Enum<Season>
Enum<Season> implements Comparable<Season>
So Enum
is parameterised on types like Season
. Abstract from Season
and
you get that the parameter of Enum
is types that satisfy
E extends Enum<E>
Maurice Naftalin (co-author, Java Generics and Collections)