| java.lang.Object | ||
| java.lang.Enum | Serializable Comparable | |
The superclass of all enumerated types.
Known Direct Subclasses| Enum(String name, int ordinal) | |||||
| Constructor for enum subtypes. | |||||
| final | int | compareTo(E o) | |||
| Answers the comparative ordering of the receiver and the given argument. | |||||
| final | boolean | equals(Object other) | |||
| Answers true only if the receiver is equal to the argument. | |||||
| final | Class | getDeclaringClass() | |||
| Answers the enum constant's declaring class. | |||||
| final | int | hashCode() | |||
| Answers the hash of the receiver. | |||||
| final | String | name() | |||
| Answers the name of the enum constant. | |||||
| final | int | ordinal() | |||
| Answers the position of the enum constant in the declaration. | |||||
| String | toString() | ||||
| Answer a string representation of the receiver suitable for display to a programmer. | |||||
| static | T | valueOf(Class enumType, String name) | |||
| Answers the named constant of the given enum type. | |||||
| final | Object | clone() | |||
| Enums are singletons, they may not be cloned. | |||||
Methods inherited
from class
java.lang.Object
Methods inherited
from interface
java.lang.Comparable
| name | the enum constant declared name. |
|---|---|
| ordinal | the enum constant position ordinal. |
| other | Object the object to compare with this object. |
|---|
Enum declaration.
| enumType | the class of the enumerated type to search for the constant value. |
|---|---|
| name | the name of the constant value to find. |
| NullPointerException | if either the enumType or name
are null. |
|---|---|
| IllegalArgumentException | if enumType is not an enumerated type or does
not have a constant value called name.
|
| CloneNotSupportedException |
|---|