|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.rutil.collection.AbstractIterator<E>
public abstract class AbstractIterator<E>
Iterator implementation that is backed by an indexed data structure. The following methods have to implemented for a read-only implemenation.
size() E get(index) by default, remove() method throws and unsupported operation exception.
| Field Summary | |
|---|---|
protected int |
curIndex
|
| Constructor Summary | |
|---|---|
AbstractIterator()
|
|
AbstractIterator(int curIndex)
|
|
| Method Summary | |
|---|---|
protected abstract E |
get(int index)
|
boolean |
hasNext()
|
E |
next()
|
void |
remove()
|
protected abstract int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int curIndex
| Constructor Detail |
|---|
public AbstractIterator()
public AbstractIterator(int curIndex)
| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iterator<E>public E next()
next in interface java.util.Iterator<E>public void remove()
remove in interface java.util.Iterator<E>protected abstract int size()
protected abstract E get(int index)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||