java.lang
Class Enum<E extends Enum<E>>
java.lang.Object
java.lang.Enum<E>
- All Implemented Interfaces:
- Comparable<E>
public abstract class Enum<E extends Enum<E>>
- extends Object
- implements Comparable<E>
- Author:
- Sven Köhler
Constructor Summary |
protected |
Enum(String name,
int ordinal)
|
Enum
protected Enum(String name,
int ordinal)
clone
protected final Object clone()
throws CloneNotSupportedException
- Description copied from class:
Object
- Create a copy of this object, using a shallow copy.
- Overrides:
clone
in class Object
- Returns:
- The new copy of the Object
- Throws:
CloneNotSupportedException
compareTo
public final int compareTo(E o)
- Description copied from interface:
Comparable
- Compares this with another Object.
Returns -1 if this object is smaller,
0 if both objects are equal and
1 if this object is bigger.
- Specified by:
compareTo
in interface Comparable<E extends Enum<E>>
- Parameters:
o
- the object to compare with
- Returns:
- one of the values -1, 0, 1
equals
public final boolean equals(Object o)
- Overrides:
equals
in class Object
finalize
protected final void finalize()
- Overrides:
finalize
in class Object
getDeclaringClass
public final Class<E> getDeclaringClass()
hashCode
public final int hashCode()
- Overrides:
hashCode
in class Object
name
public final String name()
ordinal
public final int ordinal()
toString
public String toString()
- Overrides:
toString
in class Object
valueOf
@Deprecated
public static <T extends Enum<T>> T valueOf(Class<T> enumclas,
String name)
- Deprecated. not implemented in leJOS