org.ow2.jonas.lib.ejb21
Class CollectionEnum

java.lang.Object
  extended by org.ow2.jonas.lib.ejb21.CollectionEnum
All Implemented Interfaces:
Serializable, Enumeration

public class CollectionEnum
extends Object
implements Serializable, Enumeration

This class implements the java.util.Enumeration and the java.io.Serializable interfaces.
This class is used as the return value type of the implementation of the finder methods which return a collection.
Indeed, the EJB spec. tells that the type for a collection is the java.util.Enumeration. In addition the return value type must be legal type for Java RMI (ie. serializable type).

Author:
Helene Joanin : Initial developer
See Also:
Serialized Form

Constructor Summary
CollectionEnum()
          Create an empty CollectionEnum
CollectionEnum(Vector v)
          Create a CollectionEnum from a vector
 
Method Summary
 void addElement(Object obj)
          Add an element
 boolean hasMoreElements()
          Implements Enumeration.hasMoreElements()
 Object nextElement()
          Implements Enumeration.nextElement()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionEnum

public CollectionEnum()
Create an empty CollectionEnum


CollectionEnum

public CollectionEnum(Vector v)
Create a CollectionEnum from a vector

Method Detail

addElement

public void addElement(Object obj)
Add an element


hasMoreElements

public boolean hasMoreElements()
Implements Enumeration.hasMoreElements()

Specified by:
hasMoreElements in interface Enumeration

nextElement

public Object nextElement()
                   throws NoSuchElementException
Implements Enumeration.nextElement()

Specified by:
nextElement in interface Enumeration
Throws:
NoSuchElementException


Copyright © 2010 OW2 Consortium. All Rights Reserved.