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

java.lang.Object
  extended by edu.rice.cs.plt.iter.ReadOnlyIterator<T>
      extended by edu.rice.cs.plt.iter.IndexedIterator<T>
All Implemented Interfaces:
Iterator<T>

public abstract class IndexedIterator<T>
extends ReadOnlyIterator<T>

An iterator for index-based data structures. Subclasses are only required to implement size() and get(int).


Constructor Summary
protected IndexedIterator()
           
 
Method Summary
protected abstract  T get(int index)
           
 boolean hasNext()
           
 T next()
           
protected abstract  int size()
           
 
Methods inherited from class edu.rice.cs.plt.iter.ReadOnlyIterator
remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedIterator

protected IndexedIterator()
Method Detail

size

protected abstract int size()

get

protected abstract T get(int index)

hasNext

public boolean hasNext()

next

public T next()