next(value: Any output): Boolean;
The next method of the MergeIterator class accesses successive entries in the dictionaries comprising the merged iterator view.
This method returns true when a next entry is found, and the entry is assigned to the value parameter. It returns false when a next entry is not found because the iterator is positioned after the last entry in the merged view, and the value parameter becomes a null reference.
The following example shows the use of the next method.
getPosition(pObj: Object; pIter: MergeIterator): Integer; vars pos : Integer; obj : Object; begin while pIter.next(obj) do pos := pos + 1; if obj = pObj then return pos; endif; endwhile; return 0; end;