Package org.eclipse.xtext.nodemodel.util
Class NodeIterator
- java.lang.Object
-
- com.google.common.collect.UnmodifiableIterator<INode>
-
- org.eclipse.xtext.nodemodel.util.NodeIterator
-
- All Implemented Interfaces:
java.util.Iterator<INode>,BidiIterator<INode>
public class NodeIterator extends com.google.common.collect.UnmodifiableIterator<INode> implements BidiIterator<INode>
-
-
Constructor Summary
Constructors Constructor Description NodeIterator(INode startWith)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()booleanhasPrevious()Returns true if this bidi iterator has more elements when traversing in the reverse direction.INodenext()INodeprevious()Returns the previous element.
-
-
-
Constructor Detail
-
NodeIterator
public NodeIterator(INode startWith)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<INode>
-
hasPrevious
public boolean hasPrevious()
Description copied from interface:BidiIteratorReturns true if this bidi iterator has more elements when traversing in the reverse direction. (In other words, returns true if previous would return an element rather than throwing an exception.)- Specified by:
hasPreviousin interfaceBidiIterator<INode>- Returns:
- true if the bidi iterator has more elements when traversing in the reverse direction.
-
previous
public INode previous()
Description copied from interface:BidiIteratorReturns 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.)- Specified by:
previousin interfaceBidiIterator<INode>- Returns:
- the previous element.
-
-