|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.archive.util.iterator.LookaheadIterator<T>
public abstract class LookaheadIterator<T>
Superclass for Iterators which must probe ahead to know if a 'next' exists, and thus have a cached next between a call to hasNext() and next().
| Field Summary | |
|---|---|
protected T |
next
|
| Constructor Summary | |
|---|---|
LookaheadIterator()
|
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Test whether any items remain; loads next item into holding 'next' field. |
protected abstract boolean |
lookahead()
Caches the next item if available. |
T |
next()
Return the next item. |
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected T next
| Constructor Detail |
|---|
public LookaheadIterator()
| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iterator<T>Iterator.hasNext()protected abstract boolean lookahead()
public T next()
next in interface java.util.Iterator<T>Iterator.next()public void remove()
remove in interface java.util.Iterator<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||