com.togethersoft.openapi.util.enum
Class ArrayEnumeration


public class ArrayEnumeration
implements Enumeration

Presents array of Objects as an enumeration.

Author:
TogetherSoft
Since: Together 4.0

Field Summary
 private Object[]myArray
           
 private intmyCurrent
           

Constructor Summary
ArrayEnumeration(Object[] array)
          Creates new enumeration from existing array.

Method Summary
 booleanhasMoreElements()
          Checks is there more elements in enumeration.
 ObjectnextElement()
          Returns next elements from enumeration.

Field Detail

myArray

private Object[] myArray

myCurrent

private int myCurrent
Constructor Detail

ArrayEnumeration

public ArrayEnumeration(Object[] array)
Creates new enumeration from existing array.
Parameters:
array Existing array of Objects.
Method Detail

hasMoreElements

public boolean hasMoreElements()
Checks is there more elements in enumeration.
Returns: true if there is, false else.

nextElement

public Object nextElement()
Returns next elements from enumeration.
Returns: Object, if there is element, null otherwise.

Association Links

to Class java.lang.Object