Package ghidra.util
Class ReversedListIterator<E>
java.lang.Object
ghidra.util.ReversedListIterator<E>
- Type Parameters:
E- the type of each element
- All Implemented Interfaces:
Iterator<E>,ListIterator<E>
Wraps a
ListIterator so that the operations are reversed.
NOTE: you must obtain an iterator that is already at its end. E.g., if you wish to traverse a
list in reverse, you would use
new ReversedListIterator<>(list.listIterator(list.size())).-
Constructor Details
-
ReversedListIterator
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceListIterator<E>
-
previous
- Specified by:
previousin interfaceListIterator<E>
-
nextIndex
public int nextIndex()- Specified by:
nextIndexin interfaceListIterator<E>
-
previousIndex
public int previousIndex()- Specified by:
previousIndexin interfaceListIterator<E>
-
remove
public void remove() -
set
- Specified by:
setin interfaceListIterator<E>
-
add
- Specified by:
addin interfaceListIterator<E>
-