de.fhg.igd.util
Class Enumerator

java.lang.Object
  extended by de.fhg.igd.util.Enumerator
All Implemented Interfaces:
Enumeration, Iterator

public class Enumerator
extends Object
implements Enumeration, Iterator

Wraps around an Iterator and makes it accesible by means of the EEnumeration interface.

Version:
"$Id: Enumerator.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Volker Roth

Field Summary
private  Iterator i_
          The Iterator that is encapsuled in this instance.
 
Constructor Summary
Enumerator(Iterator i)
          Creates an instance that wraps around the given Iterator.
 
Method Summary
 boolean hasMoreElements()
           
 boolean hasNext()
           
 Object next()
           
 Object nextElement()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

i_

private Iterator i_
The Iterator that is encapsuled in this instance.

Constructor Detail

Enumerator

public Enumerator(Iterator i)
Creates an instance that wraps around the given Iterator.

Parameters:
i - The Iterator that is wrapped.
Method Detail

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface Enumeration

nextElement

public Object nextElement()
Specified by:
nextElement in interface Enumeration

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.