|
Jamaica 6.4 release 1
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<E>
public abstract class Enum<E extends Enum<E>>
Enum provides the abstract super class for all JDK 1.5 enumeration types.
| Constructor Summary | |
|---|---|
protected |
Enum(String name,
int ordinal)
Constructor for one enumaration constant. |
| Method Summary | ||
|---|---|---|
protected Object |
clone()
clone is not supported by enumerations, this throws a CloneNotSupportedException. |
|
int |
compareTo(E e)
compareTo compares two Enum constants from the same enumeration. |
|
boolean |
equals(Object o)
equals returns true if this and o refer to the same constant for the same enumeration. |
|
protected void |
finalize()
Default finalizer that ensures that Enums will not be declared with a finalize method. |
|
Class<E> |
getDeclaringClass()
getDeclaringClass returns the type that declared this enumeration constant. |
|
int |
hashCode()
hashCode returns a hashcode for this constant. |
|
String |
name()
name return the identifier name of this enumeration constant. |
|
int |
ordinal()
ordinal returns the ordinal value of this enumeration element. |
|
String |
toString()
toString returns the name of this constant. |
|
static
|
valueOf(Class<T> enumType,
String name)
valueOf returns the Enum value with a given name |
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Enum(String name,
int ordinal)
name - the name of the constant.ordinal - the ordinal value of the constant.| Method Detail |
|---|
protected final Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException - in any case.public final int compareTo(E e)
compareTo in interface Comparable<E extends Enum<E>>e - the other Enum.
public final boolean equals(Object o)
equals in class Objecto - the other enumeration.
public final Class<E> getDeclaringClass()
public final int hashCode()
hashCode in class Objectpublic final String name()
public final int ordinal()
public String toString()
toString in class Object
public static <T extends Enum<T>> T valueOf(Class<T> enumType,
String name)
enumType - the enum type we request a value fromname - the name of the enum value
IllegalArgumentException - if name is not the name of any
enum value in enumType
NullPointerException - if enumType of name is null.protected final void finalize()
finalize in class Object
|
Jamaica 6.4 release 1
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||