GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
ITERATOR_ON_AVL_DICTIONARY_KEYS
+
Point of view
All features
ANY
All features
class ITERATOR_ON_AVL_DICTIONARY_KEYS [V_, K_]
Summary
top
Direct parents
Inherit list:
ITERATOR
Insert list:
AVL_TREE_ITERATOR
Class invariant
top
nodes /= Void
generation_only_grows
Overview
top
Creation features
{
ABSTRACT_AVL_DICTIONARY
}
make
(a_dico: ABSTRACT_AVL_DICTIONARY[V_, K_])
Features
{
ANY
}
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
: K_
Returns the object at the current position in the sequence.
next
Positions the iterator to the next object in the sequence.
{}
make
(a_dico: ABSTRACT_AVL_DICTIONARY[V_, K_])
dico
: ABSTRACT_AVL_DICTIONARY[V_, K_]
{
ANY
}
iterable_generation
:
INTEGER_32
{
ANY
}
is_valid
:
BOOLEAN
Check that the underlying traversable has not changed
{
ANY
}
generation
:
INTEGER_32
Agent-based features:
{
ANY
}
for_each
(action:
PROCEDURE
[
TUPLE
[TUPLE 1[E_]]])
Apply
action
to every item of
Current
.
for_all
(test:
FUNCTION
[
TUPLE
[TUPLE 1[E_]]]):
BOOLEAN
Do all items satisfy
test
?
exists
(test:
FUNCTION
[
TUPLE
[TUPLE 1[E_]]]):
BOOLEAN
Does at least one item satisfy
test
?
aggregate
(action:
FUNCTION
[
TUPLE
[TUPLE 2[E_, E_], E_]], initial: E_): E_
Aggregate all the elements starting from the initial value.
Invariant on
generation` dynamics
{}
generation_for_invariant
:
INTEGER_32
generation_only_grows
:
BOOLEAN
{}
nodes
: STACK[AVL_TREE_NODE[E_]]
cur
: AVL_TREE_NODE[E_]
go_leftmost
(node: AVL_TREE_NODE[E_])
go_next_node
(node: AVL_TREE_NODE[E_])
go_first
(root: AVL_TREE_NODE[E_])
go_next
{
RECYCLING_POOL
}
recycle
Do whatever needs to be done to free resources or recycle other objects when recycling this one
{}
new_nodes
: STACK[AVL_TREE_NODE[E_]]
nodes_pool
: RECYCLING_POOL[STACK[AVL_TREE_NODE[E_]]]
nodes_pool_memory
: RECYCLING_POOL[STACK[AVL_TREE_NODE[E_]]]
nodes_pools
:
HASHED_DICTIONARY
[
RECYCLING_POOL
[
STACK
[
AVL_TREE_NODE_ANY
]],
FIXED_STRING
]
start
effective procedure
{
ANY
}
top
Positions the iterator to the first object in the aggregate to be traversed.
ensure
is_valid
is_off
:
BOOLEAN
effective function
{
ANY
}
top
Returns True when there are no more objects in the sequence.
require
is_valid
ensure
generation = old generation
is_valid
item
: K_
effective function
{
ANY
}
top
Returns the object at the current position in the sequence.
require
is_valid
not is_off
ensure
generation = old generation
is_valid
next
effective procedure
{
ANY
}
top
Positions the iterator to the next object in the sequence.
require
is_valid
not is_off
ensure
generation = old generation
is_valid
make
(a_dico: ABSTRACT_AVL_DICTIONARY[V_, K_])
effective procedure
{}
top
ensure
dico
= a_dico
dico
: ABSTRACT_AVL_DICTIONARY[V_, K_]
writable attribute
{}
top
iterable_generation
:
INTEGER_32
effective function
{
ANY
}
top
is_valid
:
BOOLEAN
frozen
effective function
{
ANY
}
top
generation
:
INTEGER_32
deferred function
{
ANY
}
top
for_each
(action:
PROCEDURE
[
TUPLE
[TUPLE 1[E_]]])
effective procedure
{
ANY
}
top
Apply
action
to every item of
Current
.
See also
for_all
,
exists
,
aggregate
.
for_all
(test:
FUNCTION
[
TUPLE
[TUPLE 1[E_]]]):
BOOLEAN
effective function
{
ANY
}
top
Do all items satisfy
test
?
See also
for_each
,
exists
,
aggregate
.
exists
(test:
FUNCTION
[
TUPLE
[TUPLE 1[E_]]]):
BOOLEAN
effective function
{
ANY
}
top
Does at least one item satisfy
test
?
See also
for_each
,
for_all
,
aggregate
.
aggregate
(action:
FUNCTION
[
TUPLE
[TUPLE 2[E_, E_], E_]], initial: E_): E_
effective function
{
ANY
}
top
Aggregate all the elements starting from the initial value.
See also
for_each
,
for_all
,
exists
.
generation_for_invariant
:
INTEGER_32
writable attribute
{}
top
generation_only_grows
:
BOOLEAN
effective function
{}
top
nodes
: STACK[AVL_TREE_NODE[E_]]
writable attribute
{}
top
cur
: AVL_TREE_NODE[E_]
writable attribute
{}
top
go_leftmost
(node: AVL_TREE_NODE[E_])
effective procedure
{}
top
require
node =
nodes
.top
go_next_node
(node: AVL_TREE_NODE[E_])
effective procedure
{}
top
require
node =
nodes
.top
go_first
(root: AVL_TREE_NODE[E_])
effective procedure
{}
top
go_next
effective procedure
{}
top
require
not
nodes
.is_empty
recycle
effective procedure
{
RECYCLING_POOL
}
top
Do whatever needs to be done to free resources or recycle other objects when recycling this one
new_nodes
: STACK[AVL_TREE_NODE[E_]]
effective function
{}
top
nodes_pool
: RECYCLING_POOL[STACK[AVL_TREE_NODE[E_]]]
effective function
{}
top
nodes_pool_memory
: RECYCLING_POOL[STACK[AVL_TREE_NODE[E_]]]
writable attribute
{}
top
nodes_pools
:
HASHED_DICTIONARY
[
RECYCLING_POOL
[
STACK
[
AVL_TREE_NODE_ANY
]],
FIXED_STRING
]
once function
{}
top