deferred class ITERATOR [E_]

All features

The iterator pattern at work: this abstract class defines a traversal interface for any kind of aggregates data structure. An iterator can be used when you need to do something on all elements in the data structure, but there is no order concept.

To create a new iterator, use get_new_iterator in the corresponding data structure.

See examples in directory SmartEiffel/tutorial/iterator.

Direct parents

non-conformant parents

ANY

Known children

conformant children

ITERATOR_ON_BIJECTIVE_DICTIONARY_ITEMS, ITERATOR_ON_BIJECTIVE_DICTIONARY_KEYS, ITERATOR_ON_BIT_STRING, ITERATOR_ON_COLLECTION, ITERATOR_ON_DICTIONARY_ITEMS, ITERATOR_ON_DICTIONARY_KEYS, ITERATOR_ON_LINKED_LIST, ITERATOR_ON_SET, ITERATOR_ON_STRING, ITERATOR_ON_TWO_WAY_LINKED_LIST, ITERATOR_ON_UNICODE_STRING

Summary

exported features

Details

deferred start

Positions the iterator to the first object in the aggregate to be traversed.

deferred is_off: BOOLEAN

Returns True when there are no more objects in the sequence.

deferred item: E_

Returns the object at the current position in the sequence.

require

  • not is_off

deferred next

Positions the iterator to the next object in the sequence.

require

  • not is_off