Package 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 $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringnameprivate static longserialVersionUIDprivate intvalueprivate static java.util.HashMapVALUE_MAP
-
Constructor Summary
Constructors Modifier Constructor Description protectedEnum(int value, java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.lang.Objectdecode(java.lang.Class cl, java.io.ObjectInputStream in)java.lang.StringgetName()Return the name of this enum value.protected static java.lang.ObjectgetObject(java.lang.Class cl, int value)intgetValue()Returns the integer identifier for this enum value.private voidreadObject(java.io.ObjectInputStream in)protected java.lang.ObjectreadResolve()java.lang.StringtoString()voidwrite(java.io.ObjectOutputStream out)Writes this object to an ObjectOutputStream.private voidwriteObject(java.io.ObjectOutputStream out)
-
-
-
Field Detail
-
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
-
-
Method Detail
-
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:
toStringin classjava.lang.Object
-
write
public void write(java.io.ObjectOutputStream out) throws java.io.IOExceptionDescription copied from interface:WritableWrites this object to an ObjectOutputStream.
-
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
-
-