moka.util
Class Enumeration

java.lang.Object
  extended bymoka.lang.Object
      extended bymoka.util.Enumeration

public class Enumeration
extends Object

Class Enumeration represents an object generates a series of elements, one at a time. Successive calls to the nextElement method return successive elements of the series.

Since:
MDK1.0a

Field Summary
protected  Entry current
          The current element.
protected  Entry first
          The first element of the enumeration.
 
Constructor Summary
Enumeration()
           
 
Method Summary
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 Object nextElement()
          Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
 
Methods inherited from class moka.lang.Object
equals, finalize, getClassName, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

first

protected Entry first
The first element of the enumeration.


current

protected Entry current
The current element.

Constructor Detail

Enumeration

public Enumeration()
Method Detail

hasMoreElements

public boolean hasMoreElements()
Tests if this enumeration contains more elements.

Returns:
true if and only if this enumeration object contains at least one more element to provide; false otherwise.

nextElement

public Object nextElement()
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

Returns:
the next element of this enumeration or null if there is no such element.