JAPI 0.9.0
Yet another Java API
API Documentation

net.sf.japi.util
Class IteratorEnumeration<T>

java.lang.Object
  extended by net.sf.japi.util.IteratorEnumeration<T>
All Implemented Interfaces:
Enumeration<T>

public class IteratorEnumeration<T>
extends Object
implements Enumeration<T>

Enumeration proxy for Iterators. Instances are not reusable.

Author:
Christian Hujer

Constructor Summary
IteratorEnumeration(Iterator<T> iterator)
          Create an Enumeration for an Iterator.
 
Method Summary
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 T 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

IteratorEnumeration

public IteratorEnumeration(Iterator<T> iterator)
Create an Enumeration for an Iterator.

Parameters:
iterator - Iterator to create Enumeration for
Method Detail

hasMoreElements

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

Specified by:
hasMoreElements in interface Enumeration<T>
Returns:
true if and only if this enumeration object contains at least one more element to provide; false otherwise.

nextElement

public T 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<T>
Returns:
the next element of this enumeration.

JAPI
Yet another Java API
API Documentation

© 2005-2006 Christian Hujer. All rights reserved. See copyright