|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openjena.atlas.iterator.IteratorWithBuffer<T>
public class IteratorWithBuffer<T>
Iterator that delays output by N slots so you can react to the output before it's yielded. See also PeekIterator (which predates this code). See also IteratorWithHistory for an iterator that remembers what it has yielded.
PeekIterator
,
PushbackIterator
,
IteratorWithHistory
Constructor Summary | |
---|---|
IteratorWithBuffer(Iterator<T> iter,
int N)
|
Method Summary | |
---|---|
int |
currentSize()
Return the current size of the lookahead. |
boolean |
hasNext()
|
T |
next()
|
T |
peek(int idx)
Look at elements that will be returned by a subsequnet call of .next(). |
void |
remove()
|
void |
set(int idx,
T item)
Set the element to be returned by a subsequent .next(). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IteratorWithBuffer(Iterator<T> iter, int N)
Method Detail |
---|
public boolean hasNext()
hasNext
in interface Iterator<T>
public T next()
next
in interface Iterator<T>
public void remove()
remove
in interface Iterator<T>
public T peek(int idx)
public int currentSize()
public void set(int idx, T item)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |