com.ibm.wsspi.kernel.service.utils

Class CompositeEnumeration<T>

  1. java.lang.Object
  2. extended bycom.ibm.wsspi.kernel.service.utils.CompositeEnumeration<T>
All implemented interfaces:
java.util.Enumeration<T>

  1. public class CompositeEnumeration<T>
  2. extends java.lang.Object
  3. implements java.util.Enumeration<T>
Simple class to wrap several enumerations and make them look like one, as opposed to iterating them all up front and putting them into a new list.

Only use this class if you need to work with Enumerations, e.g. because you are working with an old API.


Constructor Summary

Constructor and Description
CompositeEnumeration(java.util.Enumeration<T> first)
Create the enumeration wrapping a single enumeration.

Method Summary

Modifier and Type Method and Description
  1. CompositeEnumeration<T>
add(java.util.Enumeration<T> enumeration)
Fluent method for chaining additions of subsequent enumerations.
  1. boolean
hasMoreElements()
  1. T
nextElement()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CompositeEnumeration

  1. public CompositeEnumeration(java.util.Enumeration<T> first)
Create the enumeration wrapping a single enumeration.

Method Detail

add

  1. public CompositeEnumeration<T> add( java.util.Enumeration<T> enumeration)
Fluent method for chaining additions of subsequent enumerations.

hasMoreElements

  1. public boolean hasMoreElements( )
Specified by:
hasMoreElements in interface java.util.Enumeration<T>

nextElement

  1. public T nextElement()
Specified by:
nextElement in interface java.util.Enumeration<T>