home
wiki
classes/clusters list
class information
+
Point of view
All features
ANY
All features
class DICTIONARY_KEY_TRAVERSER [V_, K_]
Summary
top
This class allows you to view a
DICTIONARY
[V_, K_] as a
TRAVERSABLE
[K_]. Note that there is no need for a DICTIONARY_ITEM_TRAVERSER because
DICTIONARY
[V_, K_] is already a
TRAVERSABLE
[V_].
Direct parents
inherit list:
TRAVERSABLE
Overview
top
creation features
from_dictionary
(dictionary_:
DICTIONARY
[V_, K_])
features
from_dictionary
(dictionary_:
DICTIONARY
[V_, K_])
lower
:
INTEGER_32
Minimum index.
upper
:
INTEGER_32
Maximum index.
count
:
INTEGER_32
Number of available indices.
is_empty
:
BOOLEAN
Is collection empty ?
See also
count
.
item
(i:
INTEGER_32
): K_
Item at the corresponding index
i
.
first
: K_
The very
first
item.
last
: K_
The
last
item.
get_new_iterator
:
ITERATOR
[K_]
dictionary
:
DICTIONARY
[V_, K_]
Indexing:
valid_index
(i:
INTEGER_32
):
BOOLEAN
True when
i
is valid (i.e., inside actual bounds).
from_dictionary
(dictionary_:
DICTIONARY
[V_, K_])
effective procedure
top
lower
:
INTEGER_32
effective function
top
Minimum index.
See also
upper
,
valid_index
,
item
.
upper
:
INTEGER_32
effective function
top
Maximum index.
See also
lower
,
valid_index
,
item
.
count
:
INTEGER_32
effective function
top
Number of available indices.
See also
is_empty
,
lower
,
upper
.
ensure
definition:
Result = upper - lower + 1
is_empty
:
BOOLEAN
effective function
top
Is collection empty ?
See also
count
.
ensure
definition:
Result = count = 0
item
(i:
INTEGER_32
): K_
effective function
top
Item at the corresponding index
i
.
See also
lower
,
upper
,
valid_index
.
require
valid_index(i)
first
: K_
effective function
top
The very
first
item.
See also
last
,
item
.
require
not is_empty
ensure
definition:
Result = item(lower)
last
: K_
effective function
top
The
last
item.
See also
first
,
item
.
require
not is_empty
ensure
definition:
Result = item(upper)
get_new_iterator
:
ITERATOR
[K_]
effective function
top
ensure
Result /= Void
dictionary
:
DICTIONARY
[V_, K_]
writable attribute
top
valid_index
(i:
INTEGER_32
):
BOOLEAN
effective function
top
True when
i
is valid (i.e., inside actual bounds).
See also
lower
,
upper
,
item
.
ensure
definition:
Result =
lower
<= i and i <=
upper