Top
INTEGER_GENERAL
ITERATOR_ON_COLLECTION
deferred class interface ITERATOR[E]
--
-- 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.
feature(s) from ITERATOR start
-- Positions the iterator to the first object in the
-- aggregate to be traversed.
is_off: BOOLEAN
-- Returns true when there are no more objects in the
-- sequence.
item: E
-- Returns the object at the current position in the
-- sequence.
require
not is_off
next
-- Positions the iterator to the next object in the
-- sequence.
require
not is_off
end of deferred ITERATOR[E]
All classes inherit from ANY, ANY inherits from
PLATFORM
and PLATFORM inherits from GENERAL.
Generated by short -html_deb on 31 March 2005.