edu.rice.cs.plt.iter
Class ReadOnlyIterator<T>

java.lang.Object
  extended by edu.rice.cs.plt.iter.ReadOnlyIterator<T>
All Implemented Interfaces:
java.util.Iterator<T>
Direct Known Subclasses:
CartesianIterator, DiagonalCartesianIterator, FilteredIterator, ImmutableIterator, IndexedIterator, NoDuplicatesIterator, PermutationIterator, SequenceIterator, SingletonIterator, SkipLastIterator

public abstract class ReadOnlyIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>

An abstract implementation of Iterator that implements Iterator.remove() by throwing an UnsupportedOperationException. (This simplifies the declaration of anonymous iterators.)


Constructor Summary
ReadOnlyIterator()
           
 
Method Summary
 void 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
hasNext, next
 

Constructor Detail

ReadOnlyIterator

public ReadOnlyIterator()
Method Detail

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<T>
Throws:
java.lang.UnsupportedOperationException