Package org.eclipse.xtext.nodemodel.util
Class SingletonBidiIterator<T>
- java.lang.Object
-
- com.google.common.collect.UnmodifiableIterator<T>
-
- org.eclipse.xtext.nodemodel.util.SingletonBidiIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>,BidiIterator<T>
public class SingletonBidiIterator<T> extends com.google.common.collect.UnmodifiableIterator<T> implements BidiIterator<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> BidiIterator<T>create(T t)booleanhasNext()booleanhasPrevious()Returns true if this bidi iterator has more elements when traversing in the reverse direction.Tnext()Tprevious()Returns the previous element.
-
-
-
Method Detail
-
create
public static <T> BidiIterator<T> create(T t)
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<T>
-
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<T>- Returns:
- true if the bidi iterator has more elements when traversing in the reverse direction.
-
previous
public T 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<T>- Returns:
- the previous element.
-
-