+
Point of view
All features
deferred class TRAVERSABLE [E_]
Summary
A TRAVERSABLE[E_] is a finite readable sequence of objects of type E_. For instance, COLLECTIONs and STRINGs are TRAVERSABLE.
A good performance should always be obtained by sequentially accessing a TRAVERSABLE with increasing indexes (from lower to upper), as demonstrated in the following code snippet :
 from
    i := a_traversable.lower
 until
    i > a_traversable.upper
 loop
    do_something_with(a_traversable.item(i))
    i := i + 1
 end
Other accessing methods (including random access and sequential access from upper to lower) may or may not lead to acceptable performance, depending on the particular implementation of TRAVERSABLE.
Direct parents
Inherit list: INDEXABLE, ITERABLE
Known children
Inherit list: ABSTRACT_STRING, BIT_STRING, CLARG_WITH_ARGS, COLLECTION, DICTIONARY_KEY_TRAVERSER, DIRECTORY, INTEGER_RANGE, JSON_ARRAY, MAP, NCURSES_LIST, SET, UNICODE_STRING
Insert list: EIFFEL_LIST_NODE, EIFFEL_LIST_NODE_IMPL
Overview
Features
{ANY}
Other features:
{ANY}
Agent-based features:
{ANY}
Printing:
{ANY}
{ANY}
{}
Counting:
{ANY}
Agent-based features:
{ANY}
{}
Indexing:
{ANY}
Accessing:
{ANY}
enumerate: ENUMERATE[E_]
effective function
{ANY}
new_iterator: ITERATOR[E_]
deferred function
{ANY}
get_new_iterator: ITERATOR[E_]
frozen
effective function
{ANY}
for_each (action: PROCEDURE[TUPLE[TUPLE 1[E_]]])
effective procedure
{ANY}
Apply action to every item of Current.
for_all (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
{ANY}
Do all items satisfy test?
exists (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
{ANY}
Does at least one item satisfy test?
aggregate (action: FUNCTION[TUPLE[TUPLE 2[E_, E_], E_]], initial: E_): E_
effective function
{ANY}
Aggregate all the elements starting from the initial value.
out_in_tagged_out_memory
effective procedure
{ANY}
Append terse printable representation of current object in tagged_out_memory.
generation: INTEGER_32
writable attribute
{ANY}
next_generation
effective procedure
{}
count: INTEGER_32
deferred function
{ANY}
Number of available items in the hoard.
is_empty: BOOLEAN
deferred function
{ANY}
Is the hoard empty ?
See also count.
do_all (action: ROUTINE[TUPLE[TUPLE 1[E_]]])
frozen
effective procedure
{ANY}
Apply action to every item of Current.
_inline_agent1 (a: ROUTINE[TUPLE[TUPLE 1[E_]]], e: E_)
frozen
effective procedure
{}
lower: INTEGER_32
deferred function
{ANY}
Minimum index.
upper: INTEGER_32
deferred function
{ANY}
Maximum index.
valid_index (i: INTEGER_32): BOOLEAN
effective function
{ANY}
True when i is valid (i.e., inside actual bounds).
item (i: INTEGER_32): E_
deferred function
{ANY}
Item at the corresponding index i.
first: E_
deferred function
{ANY}
The very first item.
last: E_
deferred function
{ANY}
The last item.