net.infonode.util
Class Enum
java.lang.Object
net.infonode.util.Enum
- All Implemented Interfaces:
- java.io.Serializable, Writable
- Direct Known Subclasses:
- Alignment, Direction, TabAreaVisiblePolicy, TabbedPanelHoverPolicy, TabDepthOrderPolicy, TabDropDownListVisiblePolicy, TabLayoutPolicy, TabSelectTrigger, TitledTabBorderSizePolicy, TitledTabSizePolicy, WindowTabState
public class Enum
- extends java.lang.Object
- implements java.io.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
- See Also:
- Serialized Form
Constructor Summary |
protected |
Enum(int value,
java.lang.String name)
|
Method Summary |
protected static java.lang.Object |
decode(java.lang.Class cl,
java.io.ObjectInputStream in)
|
java.lang.String |
getName()
Return the name of this enum value. |
protected static java.lang.Object |
getObject(java.lang.Class cl,
int value)
|
int |
getValue()
Returns the integer identifier for this enum value. |
private void |
readObject(java.io.ObjectInputStream in)
|
protected java.lang.Object |
readResolve()
|
java.lang.String |
toString()
|
void |
write(java.io.ObjectOutputStream out)
Writes this object to an ObjectOutputStream. |
private void |
writeObject(java.io.ObjectOutputStream out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
VALUE_MAP
private static final java.util.HashMap VALUE_MAP
value
private int value
name
private transient java.lang.String name
Enum
protected Enum(int value,
java.lang.String name)
getValue
public int getValue()
- Returns the integer identifier for this enum value.
- Returns:
- the integer identifier for this enum value
getName
public java.lang.String getName()
- Return the name of this enum value.
- Returns:
- the name of this enum value
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
write
public void write(java.io.ObjectOutputStream out)
throws java.io.IOException
- Description copied from interface:
Writable
- Writes this object to an ObjectOutputStream.
- Specified by:
write
in interface Writable
- Parameters:
out
- the stream
- Throws:
java.io.IOException
- if there is a stream error
getObject
protected static java.lang.Object getObject(java.lang.Class cl,
int value)
throws java.io.IOException
- Throws:
java.io.IOException
writeObject
private void writeObject(java.io.ObjectOutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
readObject
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
decode
protected static java.lang.Object decode(java.lang.Class cl,
java.io.ObjectInputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
readResolve
protected java.lang.Object readResolve()
throws java.io.ObjectStreamException
- Throws:
java.io.ObjectStreamException