net.infonode.util

Class Enum

public class Enum extends Object implements Serializable, Writable

Base class for enum classes. Each enum value contains a name and an integer identifier.

Version: $Revision: 1.8 $ $Date: 2005/02/16 11:28:14 $

Author: Jesper Nordenberg

Constructor Summary
protected Enum(int value, String name)
Method Summary
protected static Objectdecode(Class cl, ObjectInputStream in)
StringgetName()
Return the name of this enum value.
protected static ObjectgetObject(Class cl, int value)
intgetValue()
Returns the integer identifier for this enum value.
protected ObjectreadResolve()
StringtoString()
voidwrite(ObjectOutputStream out)

Constructor Detail

Enum

protected Enum(int value, String name)

Method Detail

decode

protected static Object decode(Class cl, ObjectInputStream in)

getName

public String getName()
Return the name of this enum value.

Returns: the name of this enum value

getObject

protected static Object getObject(Class cl, int value)

getValue

public int getValue()
Returns the integer identifier for this enum value.

Returns: the integer identifier for this enum value

readResolve

protected Object readResolve()

toString

public String toString()

write

public void write(ObjectOutputStream out)