Enhydra 5.1 API

org.enhydra.xml.xmlc.misc
Class ReadIterator

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.misc.ReadIterator
All Implemented Interfaces:
java.util.Iterator

public class ReadIterator
extends java.lang.Object
implements java.util.Iterator

Wrapper around Iterator objects that doesn't allow modification.


Constructor Summary
ReadIterator(java.util.Iterator iter)
          Constructor.
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements.
 java.lang.Object next()
          Returns the next element in the interation.
 void remove()
          Throws an exception, preventing modification of the underlying structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadIterator

public ReadIterator(java.util.Iterator iter)
Constructor.

Parameters:
iter - Iterator to wrap.
Method Detail

hasNext

public boolean hasNext()
Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception).

Specified by:
hasNext in interface java.util.Iterator
Returns:
true if the iterator has more elements.
See Also:
Iterator.hasNext()

next

public java.lang.Object next()
Returns the next element in the interation.

Specified by:
next in interface java.util.Iterator
Throws:
NoSuchElementException - iteration has no more elements.

remove

public void remove()
Throws an exception, preventing modification of the underlying structure.

Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException - Always thrown.

Enhydra 5.1 API