org.eclipse.xtext.nodemodel.util
Class EmptyBidiIterator<T>

java.lang.Object
  extended by com.google.common.collect.UnmodifiableIterator<T>
      extended by org.eclipse.xtext.nodemodel.util.EmptyBidiIterator<T>
All Implemented Interfaces:
java.util.Iterator<T>, BidiIterator<T>

public class EmptyBidiIterator<T>
extends com.google.common.collect.UnmodifiableIterator<T>
implements BidiIterator<T>

Author:
Sebastian Zarnekow - Initial contribution and API

Constructor Summary
EmptyBidiIterator()
           
 
Method Summary
 boolean hasNext()
           
 boolean hasPrevious()
          Returns true if this bidi iterator has more elements when traversing in the reverse direction.
static
<T> BidiIterator<T>
instance()
           
 T next()
           
 T previous()
          Returns the previous element.
 
Methods inherited from class com.google.common.collect.UnmodifiableIterator
remove
 
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
remove
 

Constructor Detail

EmptyBidiIterator

public EmptyBidiIterator()
Method Detail

instance

public static <T> BidiIterator<T> instance()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<T>

next

public T next()
Specified by:
next in interface java.util.Iterator<T>

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 interface BidiIterator<T>
Returns:
true if the bidi iterator has more elements when traversing in the reverse direction.

previous

public T 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 interface BidiIterator<T>
Returns:
the previous element.