Bali Share 1.1.18

oracle.bali.share.collection
Class CompoundEnumeration

java.lang.Object
  |
  +--oracle.bali.share.collection.CompoundEnumeration
All Implemented Interfaces:
java.util.Enumeration

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

A Enumeration implementation that iterates sequentially over two provided Enumerations, proceeding to the second Enumeration after the elements of the first have been exhausted.

See Also:
Enumeration

Constructor Summary
CompoundEnumeration(java.util.Enumeration primEnum, java.util.Enumeration secEnum)
          Create a CompoundEnumeration from two Enumerations, iterating over the primary first and then the secondary.
 
Method Summary
static java.util.Enumeration createEnumeration(java.util.Enumeration primEnum, java.util.Enumeration secEnum)
          Creates a enumeration that joins two others.
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 java.lang.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

CompoundEnumeration

public CompoundEnumeration(java.util.Enumeration primEnum,
                           java.util.Enumeration secEnum)
Create a CompoundEnumeration from two Enumerations, iterating over the primary first and then the secondary.
Method Detail

createEnumeration

public static java.util.Enumeration createEnumeration(java.util.Enumeration primEnum,
                                                      java.util.Enumeration secEnum)
Creates a enumeration that joins two others. Unlike the constructor of this class, this method allows null.

hasMoreElements

public boolean hasMoreElements()
Tests if this enumeration contains more elements.
Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true if and only if this enumeration object contains at least one more element to provide; false otherwise.

nextElement

public java.lang.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 java.util.Enumeration
Returns:
the next element of this enumeration.
Throws:
java.util.NoSuchElementException - if no more elements exist.

Bali Share 1.1.18