public class IteratorWithBuffer<T> extends Object implements Iterator<T>
PeekIterator, 
PushbackIterator, 
IteratorWithHistory| Constructor and Description | 
|---|
IteratorWithBuffer(Iterator<T> iter,
                  int N)  | 
| Modifier and Type | Method and Description | 
|---|---|
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(). 
 | 
public T peek(int idx)
public int currentSize()
public void set(int idx,
       T item)
Licenced under the Apache License, Version 2.0