Base interface
procedure Add(AObject: IInterface);
function GetObject: IInterface;
function HasNext: Boolean;
function HasPrevious: Boolean;
function Next: IInterface;
function NextIndex: Integer;
function Previous: IInterface;
function PreviousIndex: Integer;
procedure Remove;
procedure SetObject(AObject: IInterface);
procedure Add(const AString: string);
function GetString: string;
function HasNext: Boolean;
function HasPrevious: Boolean;
function Next: string;
function NextIndex: Integer;
function Previous: string;
function PreviousIndex: Integer;
procedure Remove;
procedure SetString(const AString: string);
procedure Add(AObject: TObject);
function GetObject: TObject;
function HasNext: Boolean;
function HasPrevious: Boolean;
function Next: TObject;
function NextIndex: Integer;
function Previous: TObject;
function PreviousIndex: Integer;
procedure Remove;
procedure SetObject(AObject: TObject);
An Iterator is an entity that provides methods to access or manipulate objects contained in a collection.
Method | Description |
---|---|
Add | Add AObject in the collection at the current position of the iterator. |
GetObject | Return the object from the current position of the iterator. |
HasNext | Return True if there is an object in the collection at the next step of the iterator. |
HasPrevious | Return True if there is an object in the collection at the previous step of the iterator. |
Next | Return the object from the current position and increment the step of the iterator. |
NextIndex | Return the next index of the iterator. |
Previous | Decrement the step of the iterator and Return the object from the new current position. |
PreviousIndex | Return the previous index of the iterator. |
Remove | Remove the object from the collection at the current position of the iterator? |
SetObject | Set AObject in the collection at the current posistion of the iterator. |