Java: generic enum in method parameter - Stack Overflow
See the methods in EnumSet for reference, e.g.
public static <E extends Enum<E>> EnumSet<E> of(E e) (This method returns an EnumSet with one element from a given Enum element e)
So the generic bounds you need are: <E extends Enum<E>>
Read full article from Java: generic enum in method parameter - Stack Overflow
No comments:
Post a Comment