TIterator
Abstract base class for facilities that allow iteration over elements of type
TElement
.Inheritance
Level | Ancestor | Description |
---|---|---|
1 | TObject | Ultimate ancestor in a class hierarchy |
2 | TIterator |
Source
Iterator.pas (24)
Description
Upon creation a TIterator<TElement>
is initialized at the first element.
Current
retrieves the current element if the iterator IsValid
.
GotoNext
advances the iterator to the next element.
Methods
Scope | Visibility | Result | Name | Description |
---|---|---|---|---|
Instance | protected | TElement | GetCurrent() | |
Instance | public | TBoolean | IsValid() | Returns whether the iterator is at a valid position and an evaluation of Current will succeed |
Instance | public | GotoNext() | Advances the iterator to the next position. | |
Instance | public | TIterator<TElement> | Copy() | Returns a new iterator at the same position |
Instance | public | TElement | Read() | Returns Current and then calls GotoNext |