Module java.base
Package java.lang

Class Enum<E extends Enum<E>>

java.lang.Object
java.lang.Enum<E>
Type Parameters:
E - The type of the enum subclass
All Implemented Interfaces:
Serializable, Comparable<E>, Constable

public abstract class Enum<E extends Enum<E>> extends Object implements Constable, Comparable<E>, Serializable
This is the common base class of all Java language enumeration classes. More information about enums, including descriptions of the implicitly declared methods synthesized by the compiler, can be found in section 8.9 of The Java Language Specification. Enumeration classes are all serializable and receive special handling by the serialization mechanism. The serialized representation used for enum constants cannot be customized. Declarations of methods and fields that would otherwise interact with serialization are ignored, including serialVersionUID; see the Java Object Serialization Specification for details.

Note that when using an enumeration type as the type of a set or as the type of the keys in a map, specialized and efficient set and map implementations are available.

See Java Language Specification:
8.9 Enum Classes
8.9.3 Enum Members
Since:
1.5
External Specifications
See Also: