Package org.eclipse.xtext.nodemodel
Interface BidiTreeIterator<T>
-
- All Superinterfaces:
BidiIterator<T>,java.util.Iterator<T>,org.eclipse.emf.common.util.TreeIterator<T>
- All Known Implementing Classes:
BasicNodeTreeIterator,NodeTreeIterator,ReversedBidiTreeIterator
public interface BidiTreeIterator<T> extends org.eclipse.emf.common.util.TreeIterator<T>, BidiIterator<T>
A
bidirectionaltree iterator. It can be used in both directions and even alternating.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tnext()Tprevious()Returns the previous element.-
Methods inherited from interface org.eclipse.xtext.nodemodel.BidiIterator
hasPrevious
-
-
-
-
Method Detail
-
next
T next()
Intermixed calls to
next()andprevious()may not lead to the very same element since the iterator does not return the parent element when its done with its children but the next sibling of the parent.- Specified by:
nextin interfacejava.util.Iterator<T>- Throws:
java.util.NoSuchElementException- iteration has no next element.
-
previous
T previous()
Returns the previous element. This method may be called repeatedly to iterate backwards, or intermixed with calls to next to go back and forth. (Note that alternating calls to next and previous will return the same element repeatedly.)Intermixed calls to
next()andprevious()may not lead to the very same element since the iterator does not return the parent element when its done with its children but the next sibling of the parent.- Specified by:
previousin interfaceBidiIterator<T>- Returns:
- the previous element.
- Throws:
java.util.NoSuchElementException- iteration has no previous element.
-
-