Class Enum<E extends Enum<E>>
java.lang.Object
java.lang.Enum<E>
- All Implemented Interfaces:
Comparable<E>
Implementation class required to compile enums
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected java.lang.Objectclone()final intCompares this object to the specified object to determine their relative order.final booleanequals(java.lang.Object other) final java.lang.Class<E> protected static final <T> T[]getEnumValues(java.lang.Class<T> class_) final inthashCode()final Stringname()final intordinal()protected static final voidsetEnumValues(java.lang.Object[] values, java.lang.Class c) toString()static <T extends Enum<T>>
TMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Enum
-
-
Method Details
-
clone
protected java.lang.Object clone()- Overrides:
clonein classjava.lang.Object
-
setEnumValues
protected static final void setEnumValues(java.lang.Object[] values, java.lang.Class c) -
getEnumValues
protected static final <T> T[] getEnumValues(java.lang.Class<T> class_) -
valueOf
-
equals
public final boolean equals(java.lang.Object other) - Overrides:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
- Overrides:
toStringin classjava.lang.Object
-
compareTo
Description copied from interface:ComparableCompares this object to the specified object to determine their relative order.
Parameters
another: the object to compare to this instance.
Returns
- Specified by:
compareToin interfaceComparable<E extends Enum<E>>- Returns:
a negative integer if this instance is less than
another; a positive integer if this instance is greater thananother; 0 if this instance has the same order asanother.Throws
ClassCastException: @throws ClassCastException ifanothercannot be converted into something comparable tothisinstance.
-
name
-
ordinal
public final int ordinal() -
getDeclaringClass
-