Package org.eclipse.xtext.nodemodel.impl
Class BasicNodeIterator
- java.lang.Object
-
- com.google.common.collect.UnmodifiableIterator<AbstractNode>
-
- org.eclipse.xtext.nodemodel.impl.BasicNodeIterator
-
- All Implemented Interfaces:
java.util.Iterator<AbstractNode>
,BidiIterator<AbstractNode>
public class BasicNodeIterator extends com.google.common.collect.UnmodifiableIterator<AbstractNode> implements BidiIterator<AbstractNode>
- Noextend:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BasicNodeIterator(AbstractNode startWith)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
boolean
hasPrevious()
Returns true if this bidi iterator has more elements when traversing in the reverse direction.AbstractNode
next()
AbstractNode
previous()
Returns the previous element.
-
-
-
Constructor Detail
-
BasicNodeIterator
protected BasicNodeIterator(AbstractNode startWith)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<AbstractNode>
-
next
public AbstractNode next()
- Specified by:
next
in interfacejava.util.Iterator<AbstractNode>
-
hasPrevious
public boolean hasPrevious()
Description copied from interface:BidiIterator
Returns 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:
hasPrevious
in interfaceBidiIterator<AbstractNode>
- Returns:
- true if the bidi iterator has more elements when traversing in the reverse direction.
-
previous
public AbstractNode previous()
Description copied from interface:BidiIterator
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.)- Specified by:
previous
in interfaceBidiIterator<AbstractNode>
- Returns:
- the previous element.
-
-