Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.commerce.util
Class SerializableEnumeration

    java.lang.Object
      |
      +--com.beasys.commerce.util.SerializableEnumeration

Deprecated. Use `com.bea.p13n.content.document.internal.SerializableEnumeration`

public class SerializableEnumeration
extends java.lang.Object
implements java.util.Enumeration, java.io.Serializable

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.

Since:
  2.0.1-sp1
See Also:
  Serialized Form

Field Summary
`protected java.util.Collection` | `c` Deprecated. The Collection we're fronting for.
`protected java.util.Iterator` | `i` Deprecated. The current iterator.

Constructor Summary
`SerializableEnumeration(java.util.Collection c)` Deprecated. Constructor.

Method Summary
`boolean` | `hasMoreElements()` Deprecated. Tell if this enumeration has more elements.
`java.lang.Object` | `nextElement()` Deprecated. Get the next element in the enumeration.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### c

    protected java.util.Collection c

  Deprecated.
  The Collection we're fronting for.

### i

    protected transient java.util.Iterator i

  Deprecated.
  The current iterator.

Constructor Detail

### SerializableEnumeration

    public SerializableEnumeration(java.util.Collection c)

  Deprecated.
  Constructor.

  Parameters:
    `c` - the Collection
  Throws:
    java.lang.IllegalArgumentException - thrown if c is not Serializable (most Collections are Serializable).

Method Detail

### hasMoreElements

    public boolean hasMoreElements()

  Deprecated.
  Tell if this enumeration has more elements.
  Specified by:
    hasMoreElements in interface java.util.Enumeration

### nextElement

    public java.lang.Object nextElement()

  Deprecated.
  Get the next element in the enumeration.
  Specified by:
    nextElement in interface java.util.Enumeration

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 BEA Systems, Inc. All Rights Reserved