com.darwinsys.util
Class IteratorEnumerationBridge<T>

java.lang.Object
  extended by com.darwinsys.util.IteratorEnumerationBridge<T>
All Implemented Interfaces:
java.util.Enumeration

public class IteratorEnumerationBridge<T>
extends java.lang.Object
implements java.util.Enumeration

Make instances of newer Iterator look like older Enumeration, for some kind of backwards compatibility.


Constructor Summary
IteratorEnumerationBridge(java.util.Iterator<T> it)
           
 
Method Summary
 boolean hasMoreElements()
          Tell whether this Enumeration has more elements
 T nextElement()
          Get the next element from this Enumeration; can only be called if hasMoreElements() is true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorEnumerationBridge

public IteratorEnumerationBridge(java.util.Iterator<T> it)
Method Detail

hasMoreElements

public boolean hasMoreElements()
Tell whether this Enumeration has more elements

Specified by:
hasMoreElements in interface java.util.Enumeration
See Also:
Enumeration.hasMoreElements()

nextElement

public T nextElement()
Get the next element from this Enumeration; can only be called if hasMoreElements() is true.

Specified by:
nextElement in interface java.util.Enumeration
See Also:
Enumeration.nextElement()


Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.