Package org.codehaus.groovy.util
Class ListBufferedIterator<T>
java.lang.Object
org.codehaus.groovy.util.ListBufferedIterator<T>
- All Implemented Interfaces:
BufferedIterator<T>,Iterator<T>
An implementation for BufferedIterator wraps ListIterator. This version
provides an implementation for remove().
- Since:
- 2.5.0
-
Constructor Summary
ConstructorsConstructorDescriptionListBufferedIterator(List<T> list) Creates a buffered iterator that peeks into the supplied list. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
ListBufferedIterator
Creates a buffered iterator that peeks into the supplied list.- Parameters:
list- the list to iterate
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
head
Returns the next element without advancing the iterator.- Specified by:
headin interfaceBufferedIterator<T>- Returns:
- the next element
-