The Mystery of 19.4 values ()
By deserializing the enumeration class, values () is the static () method added by the compiler. The compiler marks an enumeration class (enum) as the final class, so the enum class cannot be inherited.
19.5 implementations rather than inheritance
All enum classes inherit from the Java.lang.Enum class. Because Java does not support multiple inheritance, your enum class cannot follow other classes, however, when we create a new enum, we can implement one or more interfaces at the same time.
19.9 using Enummap
As with Enumset, the order in which an enum instance is defined determines its order in Enummap.
Constant-related methods (Constant-specific methods).
Multi-channel distribution (multiple dispatching).
19.10 Constants-related methods
With the corresponding enum instance, we can invoke the method on it. This is often referred to as table-driven code (Table-driven, note the similarity to the previously mentioned command pattern).
19.10.1 the responsibility chain for using enum
Responsibility chain (Chain of Responsibility).
19.11.1 using enum distribution
One way is to use a constructor to initialize each instance of an enum and take a "set of" results as parameters. The two are placed together, forming a structure similar to the query table.
Related articles:
Java Programming thought Lesson (iv) 17th chapter-Container in-depth discussion
Java Programming Thought Lesson (v) 18th Chapter-java IO system