edu.rice.cs.plt.iter
Class IndexedIterator<T>
java.lang.Object
edu.rice.cs.plt.iter.ReadOnlyIterator<T>
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).
|
Method Summary |
protected abstract T |
get(int index)
|
boolean |
hasNext()
|
T |
next()
|
protected abstract int |
size()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexedIterator
protected IndexedIterator()
size
protected abstract int size()
get
protected abstract T get(int index)
hasNext
public boolean hasNext()
next
public T next()