enum E { X, Y, Z; }
public E getNext() { E[] e = E.values(); int i = 0; for (; e[i] != this; i++) ; i++; i %= e.length; return e[i]; }
enum E { X, Y, Z; }
public E getNext() { E[] e = E.values(); int i = 0; for (; e[i] != this; i++) ; i++; i %= e.length; return e[i]; }