...
According to the Java API, Class Enum<E extends Enum<E>> [API 2011], Class Enum<E extends Enum<E>>, public final int ordinal()
...
The Java Language Specification [JLS 2011], §8.9, "Enums" [JLS 2011], " does not specify the use of ordinal()
in programs. However, attaching external significance to the ordinal()
value of an enum
constant is error prone and should be avoided.
...