public class EnumExample
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static EnumExample |
DONALD
The enumeration item with name DONALD and value The Duck King.
|
static EnumExample |
JOE
The enumeration item with name JOE and value John Doe.
|
static EnumExample |
POPEYE
The enumeration item with name POPEYE and value Olivia's Lover.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
static EnumExample |
getInstanceByName(java.lang.String pName)
Returns the item with the given name.
|
static EnumExample |
getInstanceByValue(java.lang.String pValue)
Returns the item with the given value.
|
static EnumExample[] |
getInstances() |
java.lang.String |
getName()
The enumeration items name.
|
java.lang.String |
getValue()
The enumeration items value.
|
int |
hashCode() |
public static final EnumExample JOE
public static final EnumExample POPEYE
public static final EnumExample DONALD
public java.lang.String getName()
public java.lang.String getValue()
public static EnumExample[] getInstances()
public static EnumExample getInstanceByName(java.lang.String pName)
java.lang.IllegalArgumentException - The name pName is invalid and no such item exists.public static EnumExample getInstanceByValue(java.lang.String pValue)
java.lang.IllegalArgumentException - The name pValue is invalid and no such item exists.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object