Package com.google.common.collect
Class TreeTraverser.BreadthFirstIterator
java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.TreeTraverser.BreadthFirstIterator
- All Implemented Interfaces:
PeekingIterator<T>
,Iterator<T>
- Enclosing class:
TreeTraverser<T>
private final class TreeTraverser.BreadthFirstIterator
extends UnmodifiableIterator<T>
implements PeekingIterator<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.google.common.collect.UnmodifiableIterator
remove
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
Methods inherited from interface com.google.common.collect.PeekingIterator
remove
-
Field Details
-
queue
-
-
Constructor Details
-
BreadthFirstIterator
BreadthFirstIterator(T root)
-
-
Method Details
-
hasNext
public boolean hasNext() -
peek
Description copied from interface:PeekingIterator
Returns the next element in the iteration, without advancing the iteration.Calls to
peek()
should not change the state of the iteration, except that it may prevent removal of the most recent element viaPeekingIterator.remove()
.- Specified by:
peek
in interfacePeekingIterator<T>
-
next
Description copied from interface:PeekingIterator
The objects returned by consecutive calls to
PeekingIterator.peek()
thenPeekingIterator.next()
are guaranteed to be equal to each other.
-