public class Enum<E extends Enum<E>> extends Object implements Comparable<E>
| Modifier | Constructor and Description |
|---|---|
protected |
Enum(String name,
int ordinal) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
clone() |
int |
compareTo(E e)
Compares this object to the specified object to determine their relative
order.
|
boolean |
equals(Object other)
Indicates whether some other object is "equal to" this one.
|
Class<E> |
getDeclaringClass() |
protected static <T> T[] |
getEnumValues(Class<T> class_) |
int |
hashCode()
Returns a hash code value for the object.
|
String |
name() |
int |
ordinal() |
protected static void |
setEnumValues(Object[] values,
Class c) |
String |
toString()
Returns a string representation of the object.
|
static <T extends Enum<T>> |
valueOf(Class<T> enumType,
String name) |
protected Enum(String name, int ordinal)
protected static final <T> T[] getEnumValues(Class<T> class_)
public final boolean equals(Object other)
Objectpublic final int hashCode()
Objectpublic String toString()
Objectpublic final int compareTo(E e)
ComparablecompareTo in interface Comparable<E extends Enum<E>>e - the object to compare to this instance.another;
a positive integer if this instance is greater than
another; 0 if this instance has the same order as
another.public final String name()
public final int ordinal()