net.sf.jaxme.js.junit
Class EnumExample

java.lang.Object
  extended bynet.sf.jaxme.js.junit.EnumExample
All Implemented Interfaces:
java.io.Serializable

public class EnumExample
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
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.
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOE

public static final EnumExample JOE
The enumeration item with name JOE and value John Doe.


POPEYE

public static final EnumExample POPEYE
The enumeration item with name POPEYE and value Olivia's Lover.


DONALD

public static final EnumExample DONALD
The enumeration item with name DONALD and value The Duck King.

Method Detail

getName

public java.lang.String getName()
The enumeration items name.


getValue

public java.lang.String getValue()
The enumeration items value.


getInstances

public static EnumExample[] getInstances()

getInstanceByName

public static EnumExample getInstanceByName(java.lang.String pName)
Returns the item with the given name.

Throws:
java.lang.IllegalArgumentException - The name pName is invalid and no such item exists.

getInstanceByValue

public static EnumExample getInstanceByValue(java.lang.String pValue)
Returns the item with the given value.

Throws:
java.lang.IllegalArgumentException - The name pValue is invalid and no such item exists.

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()