|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.nodemodel.util.ReversedBidiIterable<T> org.eclipse.xtext.nodemodel.util.ReversedBidiTreeIterable<T>
public class ReversedBidiTreeIterable<T>
Constructor Summary | |
---|---|
ReversedBidiTreeIterable(BidiTreeIterable<T> delegate)
|
Method Summary | |
---|---|
protected BidiTreeIterable<T> |
getDelegate()
|
BidiTreeIterator<T> |
iterator()
Returns an iterator that can be used forwards and backwards. |
BidiTreeIterable<T> |
reverse()
Returns a reverse version of this iterable that can be used forwards and backwards. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReversedBidiTreeIterable(BidiTreeIterable<T> delegate)
Method Detail |
---|
public BidiTreeIterator<T> iterator()
BidiIterable
iterator
in interface java.lang.Iterable<T>
iterator
in interface BidiIterable<T>
iterator
in interface BidiTreeIterable<T>
iterator
in class ReversedBidiIterable<T>
null
.public BidiTreeIterable<T> reverse()
BidiIterable
Returns a reverse version of this iterable that can be used
forwards and backwards. In other words, an iterator provided by
the reverse iterable will delegate its hasNext()
and next()
invocations to
BidiIterator.hasPrevious()
and BidiIterator.previous()
respectively.
This allows clients to iterate backwards by means of the enhanced for-loop:
for(T t: iterable.reverse()) { // do something with t }
reverse
in interface BidiIterable<T>
reverse
in interface BidiTreeIterable<T>
reverse
in class ReversedBidiIterable<T>
null
.protected BidiTreeIterable<T> getDelegate()
getDelegate
in class ReversedBidiIterable<T>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |