0

Is there a way to use the "values()" method from a generic enum ?

public class TCP_Message<T extends Enum<T>> {

    public T anEnum;

    public void doSomething() {
        anEnum = T.values().values[0];
    }
}

this code does not allow me to access .values().

Axel Samyn
  • 160
  • 1
  • 12

0 Answers0