gishur.core
Class ConcatEnumeration

java.lang.Object
  |
  +--gishur.core.ConcatEnumeration
All Implemented Interfaces:
java.util.Enumeration

public class ConcatEnumeration
extends java.lang.Object
implements java.util.Enumeration

A ConcatEnumeration-object is an Enumeration that enumerates some Enumerations. It is possible to add more Enumerations using add.

Version:
1.0
Author:
Thomas Wolf

Constructor Summary
ConcatEnumeration()
          Empty constructor.
ConcatEnumeration(java.util.Enumeration enum)
          Constructor which stores the Enumeration enum.
ConcatEnumeration(java.util.Enumeration enum1, java.util.Enumeration enum2)
          Constructor which stores the Enumerations enum1 and enum2.
 
Method Summary
 void add(BasicList list)
          Adds an Enumeration of the keys of the list list into this ConcatEnumeration.
 void add(java.util.Enumeration enum)
          Inserts the Enumeration enum into this ConcatEnumeration.
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 java.lang.Object nextElement()
          Returns the next element of this enumeration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcatEnumeration

public ConcatEnumeration()
Empty constructor.

ConcatEnumeration

public ConcatEnumeration(java.util.Enumeration enum)
Constructor which stores the Enumeration enum.
Parameters:
enum - Enumeration

ConcatEnumeration

public ConcatEnumeration(java.util.Enumeration enum1,
                         java.util.Enumeration enum2)
Constructor which stores the Enumerations enum1 and enum2.
Parameters:
enum1 - first Enumeration
enum2 - second Enumeration
Method Detail

add

public void add(java.util.Enumeration enum)
Inserts the Enumeration enum into this ConcatEnumeration.
Parameters:
enum - new Enumeration

add

public void add(BasicList list)
Adds an Enumeration of the keys of the list list into this ConcatEnumeration.
Parameters:
list - a list

hasMoreElements

public boolean hasMoreElements()
Tests if this enumeration contains more elements.
Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true if this enumeration contains more elements; false otherwise.
Since:
JDK1.0

nextElement

public java.lang.Object nextElement()
Returns the next element of this enumeration.
Specified by:
nextElement in interface java.util.Enumeration
Returns:
the next element of this enumeration.
Throws:
java.util.NoSuchElementException - if no more elements exist.
Since:
JDK1.0