Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Java Language Specification, §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.

...

ISO/IEC TR 24772:2013Enumerator Issues [CCB]

Bibliography

[API 2011]

Class Enum<E extends Enum<E>>

[Bloch 2008]Item 31, "Use Instance Fields Instead of Ordinals"
[JLS 2011]§8.9, "Enums"

 

...