Overview Package Class Use Tree Deprecated Index Help
Prev Class Next Class Frames NoFrames All Classes
Summary: Nested Field Constr Method Detail: Field Constr Method
java.lang
public class Enum<E extends Enum<E>> extends Object implements Comparable<E>, Serializable
Since: 1.5
Version: 1.1, 01/27/03
Author: Neal Gafter
| Field Summary | |
|---|---|
| String | name
The name of this enum constant, as declared in the enum declaration.
|
| int | ordinal
The ordinal of this enumeration constant (its position
in the enum declaration, where the initial constant is assigned
an ordinal of zero).
|
| Constructor Summary | |
|---|---|
| protected | Enum(String name, int ordinal)
Sole constructor. |
| Method Summary | |
|---|---|
| protected Object | clone()
Throws CloneNotSupportedException. |
| int | compareTo(E o)
Compares this enum with the specified object for order. |
| boolean | equals(Object other)
Returns true if the specified object is equal to this
enum constant.
|
| List<E> | family()
Returns an immutable list of all the enum constants in this
enum constant's enum class. |
| int | hashCode()
Returns a hash code for this enum constant.
|
| protected Object | readResolve()
This method ensures proper deserialization of enum constants.
|
| String | toString()
Returns the name of this enum constant, as contained in the
declaration. |
| protected static <E extends Enum<E>> E | valueOf(List<E> family, String name)
This helper function exists in the prototype only; it will not
appear in the final implementation. |
Parameters: name - The name of this enum constant, which is the identifier used to declare it. ordinal - The ordinal of this enumeration constant (its position in the enum declaration, where the initial constant is assigned an ordinal of zero).
Returns: (never returns)
Parameters: o the object to be compared for equality with this object.
Returns: true if the specified object is equal to this enum constant.
Returns: an immutable list of all of the enum constants in this enum constant's enum class.
Returns: a hash code for this enum constant.
UNKNOWN: the canonical form of this desesrialized enum const.
Returns: the name of this enum constant