API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. Enum View Source
Author(s)
Josh Bloch
Neal Gafter
Since
1.5
Version
1.15, 01/27/06
Serial
Hierarchy
 Object
      Enum
Implements
 Comparable
 Serializable
Subclasses
Description
publicabstract abstract class Enum
  This is the common base class of all Java language enumeration types.
See also:   
Constructors
protected Enum (String name, int ordinal)
  Sole constructor.
Methods
Hide/Show inherited methods
protectedfinal Object clone () throws CloneNotSupportedException
  Throws CloneNotSupportedException.
publicfinal int compareTo ( E o)
  Compares this enum with the specified object for order.
publicfinal boolean equals (Object other)
  Returns true if the specified object is equal to this enum constant.
protectedfinal void finalize ()
enum classes cannot have finalize methods.
publicfinal Class< E> getDeclaringClass ()
  Returns the Class object corresponding to this enum constant's enum type.
publicfinal int hashCode ()
  Returns a hash code for this enum constant.
publicfinal String name ()
  Returns the name of this enum constant, exactly as declared in its enum declaration.
publicfinal int ordinal ()
  Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).
public String toString ()
  Returns the name of this enum constant, as contained in the declaration.
publicstatic T valueOf (Class< T> enumType, String name)
  Returns the enum constant of the specified enum type with the specified name.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar