com.cafesoft.core.collections
Class DoubleEnumeration

java.lang.Object
  |
  +--com.cafesoft.core.collections.DoubleEnumeration
All Implemented Interfaces:
Enumeration

public class DoubleEnumeration
extends Object
implements Enumeration

DoubleEnumeration takes two enumeration collections and handles them like a single Enumeration object.

Since:
7/16/03
See Also:
Enumeration

Constructor Summary
DoubleEnumeration(Enumeration e1, Enumeration e2)
          Create a new DoubleEnumeration.
 
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleEnumeration

public DoubleEnumeration(Enumeration e1,
                         Enumeration e2)
Create a new DoubleEnumeration.

Parameters:
e1 - the first enumeration.
e2 - the second enumeration.
Throws:
NullPointerException - if either e1 or e2 is null.
Method Detail

hasMoreElements

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

Specified by:
hasMoreElements in interface Enumeration
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.

Specified by:
nextElement in interface Enumeration
Returns:
the next element of this enumeration.
Throws:
NoSuchElementException - if no more elements exist.


Generated on 10:40:31 AM September 10, 2003, © 1996-2003 Cafésoft LLC. All rights reserved.