Effective Java Chapter 6 34-35
Chapter 6. ENUM and Annotations
34. Use enums instead of int constants
- When should I use an enum? → Whenever you need a set of constants that are revealed at compile time!
- The constant-specific method was unfamiliar and didn't fit. .. The following explanation was easy to understand.
http://d.hatena.ne.jp/hageyahhoo/20091115/1258258461
35. Use instance field values rather than ordinal
- In the first place, the ordinal method is used for EnumSet and EnumMap, and most programmers do not use it.