# Class Enum<E extends Enum<E>>

java.lang.Object
java.lang.Enum<E>

All Implemented Interfaces:
  `Comparable<E>`

public class Enum<E extends Enum<E>> extends java.lang.Object implements Comparable<E>
Implementation class required to compile enums

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `Enum(String name, int ordinal)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected java.lang.Object`
  `clone()`
  `final int`
  `compareTo(E e)`
  Compares this object to the specified object to determine their relative order.
  `final boolean`
  `equals(java.lang.Object other)`
  `final java.lang.Class<E>`
  `getDeclaringClass()`
  `protected static final <T> T[]`
  `getEnumValues(java.lang.Class<T> class_)`
  `final int`
  `hashCode()`
  `final String`
  `name()`
  `final int`
  `ordinal()`
  `protected static final void`
  `setEnumValues(java.lang.Object[] values, java.lang.Class c)`
  `String`
  `toString()`
  `static <T extends Enum<T>>
  T`
  `valueOf(java.lang.Class<T> enumType, String name)`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Enum

    protected Enum(String name, int ordinal)

- ## Method Details

  - ### clone

    protected java.lang.Object clone()
    Overrides:
      `clone` in class `java.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

    public static <T extends Enum<T>> T valueOf(java.lang.Class<T> enumType, String name)

  - ### equals

    public final boolean equals(java.lang.Object other)
    Overrides:
      `equals` in class `java.lang.Object`

  - ### hashCode

    public final int hashCode()
    Overrides:
      `hashCode` in class `java.lang.Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `java.lang.Object`

  - ### compareTo

    public final int compareTo(E e)
    Description copied from interface: `Comparable`

    Compares this object to the specified object to determine their relative order.

    ###### Parameters

    - `another`: the object to compare to this instance.

    ###### Returns

    Specified by:
      `compareTo` in interface `Comparable<E extends Enum<E>>`
    Returns:

      a negative integer if this instance is less than `another`; a positive integer if this instance is greater than `another`; 0 if this instance has the same order as `another`.

      ###### Throws

      - `ClassCastException`: @throws ClassCastException if `another` cannot be converted into something comparable to `this` instance.

  - ### name

    public final String name()

  - ### ordinal

    public final int ordinal()

  - ### getDeclaringClass

    public final java.lang.Class<E> getDeclaringClass()