Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Util.Collections
Class EnumerationIterator  view EnumerationIterator download EnumerationIterator.java

java.lang.Object
  extended byUtil.Collections.UnmodifiableIterator
      extended byUtil.Collections.EnumerationIterator
All Implemented Interfaces:
java.util.Iterator

public class EnumerationIterator
extends UnmodifiableIterator
implements java.util.Iterator

An EnumerationIterator converts an Enumeration into an Iterator.

Version:
$Id: EnumerationIterator.java,v 1.2 2003/05/12 10:05:21 joewhaley Exp $

Field Summary
private  java.util.Enumeration e
           
 
Constructor Summary
EnumerationIterator(java.util.Enumeration e)
          Creates a EnumerationIterator.
 
Method Summary
 boolean hasNext()
          Tests whether there are elements remaining in the collection.
 java.lang.Object next()
          Obtain the next element in the collection.
 
Methods inherited from class Util.Collections.UnmodifiableIterator
remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
remove
 

Field Detail

e

private final java.util.Enumeration e
Constructor Detail

EnumerationIterator

public EnumerationIterator(java.util.Enumeration e)
Creates a EnumerationIterator.

Method Detail

hasNext

public boolean hasNext()
Description copied from interface: java.util.Iterator
Tests whether there are elements remaining in the collection. In other words, calling next() will not throw an exception.

Specified by:
hasNext in interface java.util.Iterator
Specified by:
hasNext in class UnmodifiableIterator

next

public java.lang.Object next()
Description copied from interface: java.util.Iterator
Obtain the next element in the collection.

Specified by:
next in interface java.util.Iterator
Specified by:
next in class UnmodifiableIterator