Qore Programming Language Reference Manual 1.19.2
|
This class an iterator class for lists. More...
#include <QC_ListReverseIterator.dox.h>
Public Member Methods | |
constructor (softlist< auto > l) | |
Creates the list iterator object. More... | |
copy () | |
Creates a copy of the ListReverseIterator object, iterating the same object as the original and in the same position. More... | |
bool | first () |
returns True if on the first element iterated with this iterator (ie the last element in the list) More... | |
bool | last () |
returns True if on the last element iterated with this iterator (ie the first element in the list) More... | |
bool | next () |
Moves the current position to the previous element in the list; returns False if there are no more elements; if the iterator is not pointing at a valid element before this call, the iterator will be positioned on the last element in the list if the list is not empty. More... | |
bool | prev () |
Moves the current position to the next element in the list; returns False if there are no more elements; if the iterator is not pointing at a valid element before this call, the iterator will be positioned on the first element in the list if the list is not empty. More... | |
Public Member Methods inherited from Qore::ListIterator | |
constructor (softlist< auto > l) | |
Creates the list iterator object. More... | |
copy () | |
Creates a copy of the ListIterator object, iterating the same object as the original and in the same position. More... | |
bool | empty () |
returns True if the list is empty; False if not More... | |
bool | first () |
returns True if on the first element of the list More... | |
auto | getValue () |
returns the current value or throws an INVALID-ITERATOR exception if the iterator is invalid More... | |
int | index () |
returns the current iterator position in the list or -1 if not pointing at a valid element More... | |
bool | last () |
returns True if on the last element of the list More... | |
int | max () |
returns the number of elements in the list More... | |
bool | next () |
Moves the current position to the next element in the list; returns False if there are no more elements; if the iterator is not pointing at a valid element before this call, the iterator will be positioned on the first element in the list if the list is not empty. More... | |
bool | prev () |
Moves the current position to the previous element in the list; returns False if there are no more elements; if the iterator is not pointing at a valid element before this call, the iterator will be positioned on the last element in the list if the list is not empty. More... | |
reset () | |
Reset the iterator instance to its initial state. More... | |
bool | set (int pos) |
sets the new position in the list; if the position is invalid then the method returns False, meaning the iterator is not valid, otherwise it returns True More... | |
bool | valid () |
returns True if the iterator is currently pointing at a valid element, False if not More... | |
abstract bool | prev () |
Moves the current position to the previous element; returns False if there are no more elements. More... | |
abstract auto | getValue () |
returns the current value More... | |
abstract bool | next () |
Moves the current position to the next element; returns False if there are no more elements. More... | |
abstract bool | valid () |
returns True if the iterator is currently pointing at a valid element, False if not More... | |
abstract bool | empty () |
returns True if the object to iterate is empty; False if not More... | |
abstract bool | first () |
returns True if on the first element More... | |
abstract bool | last () |
returns True if on the last element More... | |
This class an iterator class for lists.
Call ListReverseIterator::next() to iterate through the list in reverse order; do not use the iterator if ListReverseIterator::next() returns False. A list can be iterated in reverse order by calling ListReverseIterator::prev() instead of ListReverseIterator::next()
ITERATOR-THREAD-ERROR
to be thrown.Qore::ListReverseIterator::constructor | ( | softlist< auto > | l | ) |
Qore::ListReverseIterator::copy | ( | ) |
Creates a copy of the ListReverseIterator object, iterating the same object as the original and in the same position.
|
virtual |
returns True if on the first element iterated with this iterator (ie the last element in the list)
Reimplemented from Qore::ListIterator.
|
virtual |
returns True if on the last element iterated with this iterator (ie the first element in the list)
Reimplemented from Qore::ListIterator.
|
virtual |
Moves the current position to the previous element in the list; returns False if there are no more elements; if the iterator is not pointing at a valid element before this call, the iterator will be positioned on the last element in the list if the list is not empty.
This method will return True again after it returns False once if the list is not empty, otherwise it will always return False. The iterator object should not be used after this method returns False
ITERATOR-THREAD-ERROR | this exception is thrown if this method is called from any thread other than the thread that created the object |
Reimplemented from Qore::ListIterator.
|
virtual |
Moves the current position to the next element in the list; returns False if there are no more elements; if the iterator is not pointing at a valid element before this call, the iterator will be positioned on the first element in the list if the list is not empty.
This method will return True again after it returns False once if list is not empty, otherwise it will always return False. The iterator object should not be used after this method returns False
ITERATOR-THREAD-ERROR | this exception is thrown if this method is called from any thread other than the thread that created the object |
Reimplemented from Qore::ListIterator.