Class ProgramPage.AbstractTreeIterator<T>
- java.lang.Object
-
- org.ametys.plugins.odfweb.repository.ProgramPage.AbstractTreeIterator<T>
-
- Type Parameters:
T- A tree item
- All Implemented Interfaces:
Iterator<T>
- Direct Known Subclasses:
CoursePage.CourseListTraverser,ProgramPage.ProgramPartTraverser
- Enclosing class:
- ProgramPage
abstract static class ProgramPage.AbstractTreeIterator<T> extends Object implements Iterator<T>
Breadth first search iterator for tree structure Each node can provide an iterator that will be put in the end of the queue.
-
-
Constructor Summary
Constructors Constructor Description AbstractTreeIterator(Collection<? extends T> children)AbstractTreeIterator(Iterator<T> iterator)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private Iterator<T>_getOrUpdateHead()private Iterator<T>_updateHead()private static <T> Iterator<T>handleConstructorChildren(Collection<? extends T> children)booleanhasNext()Tnext()protected abstract Iterator<T>provideChildIterator(T next)Stream<T>stream()-
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, remove
-
-
-
-
Constructor Detail
-
AbstractTreeIterator
AbstractTreeIterator(Iterator<T> iterator)
-
AbstractTreeIterator
AbstractTreeIterator(Collection<? extends T> children)
-
-
Method Detail
-
handleConstructorChildren
private static <T> Iterator<T> handleConstructorChildren(Collection<? extends T> children)
-
provideChildIterator
protected abstract Iterator<T> provideChildIterator(T next)
-
_getOrUpdateHead
private Iterator<T> _getOrUpdateHead()
-
_updateHead
private Iterator<T> _updateHead()
-
-