High-performance collections EnumMap and EnumSet

This article introduces EnumMap and EnumSet, which is a collection class under the java.util package. The Map and Set structures are especially used in our daily work, and often used to store data or pass parameters, but there is no way to control the data setting of Map, we have no idea what kind of data others will put into it, or if the type and number of data Key of our Map is fixed in some scenarios, then in this case How can we improve the security and performance of the system?