Qore Programming Language Reference Manual
0.9.1
|
This class defines an abstract interface for iterators. More...
Public Member Methods | |
abstract any | 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... | |
This class defines an abstract interface for iterators.
Classes inheriting this class can be used to iterate abstract or complex objects with while Statements (using AbstractIterator::next()) or directly in the following language constructs:
|
pure virtual |
returns the current value
INVALID-ITERATOR | the iterator is not pointing at a valid element |
Implemented in Qore::SQL::SQLStatement, Qore::SQL::AbstractSQLStatement, Qore::HashListIterator, Qore::HashIterator, Qore::ListHashIterator, Qore::FileLineIterator, Qore::InputStreamLineIterator, Qore::ListIterator, Qore::DataLineIterator, Qore::ObjectPairReverseIterator, Qore::RangeIterator, Qore::ObjectKeyReverseIterator, Qore::HashKeyReverseIterator, Qore::HashPairReverseIterator, Qore::ObjectPairIterator, Qore::ObjectKeyIterator, Qore::HashPairIterator, Qore::HashKeyIterator, Qore::SingleValueIterator, and Qore::AbstractLineIterator.
|
pure virtual |
Moves the current position to the next element; returns False if there are no more elements.
This method will return True again after it returns False once if the object being iterated is not empty, otherwise it will always return False. The iterator object should not be used after this method returns False
Implemented in Qore::SQL::SQLStatement, Qore::SQL::AbstractSQLStatement, Qore::HashListIterator, Qore::ListHashIterator, Qore::HashIterator, Qore::FileLineIterator, Qore::ListIterator, Qore::HashListReverseIterator, Qore::InputStreamLineIterator, Qore::DataLineIterator, Qore::ListHashReverseIterator, Qore::ObjectReverseIterator, Qore::HashReverseIterator, Qore::ListReverseIterator, Qore::RangeIterator, Qore::SingleValueIterator, and Qore::AbstractLineIterator.
|
pure virtual |
returns True if the iterator is currently pointing at a valid element, False if not
Implemented in Qore::SQL::SQLStatement, Qore::SQL::AbstractSQLStatement, Qore::HashListIterator, Qore::ListHashIterator, Qore::HashIterator, Qore::FileLineIterator, Qore::ListIterator, Qore::DataLineIterator, Qore::InputStreamLineIterator, Qore::RangeIterator, Qore::SingleValueIterator, and Qore::AbstractLineIterator.