public abstract class Enum
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Enum() |
Enum(java.lang.String name,
int id)
Creates enumeration with given name and id.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
static java.lang.Object |
getDefaultValue(java.lang.Class param)
Gets default enumeration for given class.
|
java.lang.String |
getEnum()
Gets name of this enumeration.
|
int |
getID()
Gets id of this enumeration.
|
static Enum |
getInstance(java.lang.String name,
java.lang.Class cl)
Gets enumaration of given class with given name.
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
isEqual(Enum src)
Indicates whether some other enumeration is "equal to" this one.
|
static Enum[] |
list(java.lang.Class cl)
Gets list of all enumaration types of given class.
|
static java.lang.String[] |
listNames(java.lang.Class cl)
Gets list of all enumaration names of given class.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
public Enum()
public Enum(java.lang.String name,
int id)
name - Name od the enumeration.id - Id of the enumeration.public int getID()
public java.lang.String getEnum()
public boolean isEqual(Enum src)
src - the enumeration with which to compare.true if this enumeration is the same as the src argument;
false otherwise.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the reference object with which to compare.true if this object is the same as the obj argument;
false otherwise.public java.lang.String toString()
toString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.toString in class java.lang.Objectpublic int hashCode()
java.util.Hashtable.hashCode in class java.lang.Objectpublic static Enum getInstance(java.lang.String name, java.lang.Class cl)
name - name of the enumarion.cl - enumeration class.public static java.lang.String[] listNames(java.lang.Class cl)
cl - enumetion class.public static Enum[] list(java.lang.Class cl)
cl - enumeration class.public static java.lang.Object getDefaultValue(java.lang.Class param)
param - enumeration class.