|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.horstmann.violet.framework.SerializableEnumeration
public class SerializableEnumeration
This class is a superclass for enumerated types that can be serialized. Subclass like this:
public class MyEnumeration extends SerializableEnumeration { private MyEnumeration() {} public static final MyEnumeration FOO = new MyEnumeration(); public static final MyEnumeration BAR = new MyEnumeration(); . . . }This defines instances
MyEnumeration.FOO
and
MyEnumeration.BAR
that are guaranteed to
be preserved through serialization and deserialization.
Conveniently, the toString method yields the name (such
as "FOO").
- See Also:
- Serialized Form
Constructor Summary
SerializableEnumeration()
Method Summary
java.lang.String
toString()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
SerializableEnumeration
public SerializableEnumeration()
Method Detail
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD