|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.beasys.commerce.util.SerializableEnumeration
@Deprecated public class SerializableEnumeration
An implementation of the Enumeration interface which is Serializable.
Note: Since most Enumeration implementations aren't Serializable (including Vector.elements() and Collections.enumeration()), we need this to return Enumerations from SessionBeans and other RemoteObjects. Most collection classes are Serializable, so that's nice. However, to make life easier, this uses the underlying Collection's iterator, most of which also aren't Serializable. Therefore, if a partial enumeration has been done before this Enumeration is serialized, the enumeration will start over on the other side because this internally keeps the Collection's Iterator in a transient field (since Iterator aren't generally Serializable).
This is also intentionally not thread-safe.
Field Summary | |
---|---|
protected Collection |
c
Deprecated See BEA Commerce product offering |
protected Iterator |
i
Deprecated See BEA Commerce product offering |
Constructor Summary | |
---|---|
SerializableEnumeration(Collection c)
Deprecated See BEA Commerce product offering |
Method Summary | |
---|---|
boolean |
hasMoreElements()
Deprecated See BEA Commerce product offering |
Object |
nextElement()
Deprecated See BEA Commerce product offering |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Collection c
protected transient Iterator i
Constructor Detail |
---|
public SerializableEnumeration(Collection c)
c
- the Collection
IllegalArgumentException
- thrown if c is not Serializable (most
Collections are Serializable).Method Detail |
---|
public boolean hasMoreElements()
hasMoreElements
in interface Enumeration
public Object nextElement()
nextElement
in interface Enumeration
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |