+
Point of view
ANY
deferred class DICTIONARY [V_, K_]
Summary
Class invariant
Overview
exported features
Counting:
Basic access:
  • has (k: K_): BOOLEAN
    Is there a value currently associated with key k?
  • at (k: K_): V_
    Return the value associated to key k.
  • infix "@" (k: K_): V_
    The infix notation which is actually a synonym for at.
  • reference_at (k: K_): V_
    Return Void or the value associated with key k.
  • fast_has (k: K_): BOOLEAN
    Is there a value currently associated with key k?
  • fast_at (k: K_): V_
    Return the value associated to key k using basic = for comparison.
  • fast_reference_at (k: K_): V_
    Same work as reference_at, but basic = is used for comparison.
  • put (v: V_, k: K_)
    Change some existing entry or add the new one.
  • fast_put (v: V_, k: K_)
    Same job as put, but uses basic = for comparison.
  • add (v: V_, k: K_)
    To add a new entry k with its associated value v.
Looking and searching some value:
Removing:
To provide iterating facilities:
  • is_equal (other: DICTIONARY [V_, K_]): BOOLEAN
    Do both dictionaries have the same set of associations?
  • is_equal_map (other: DICTIONARY [V_, K_]): BOOLEAN
    Do both dictionaries have the same set of associations?
  • copy (other: DICTIONARY [V_, K_])
    Reinitialize by copying all associations of other.
Agents based features:
Other features:
  • internal_key (k: K_): K_
    Retrieve the internal key object which correspond to the existing entry k (the one memorized into the Current dictionary).
Indexing:
Counting:
Other features:
is_empty: BOOLEAN
effective function
Is it empty?
has (k: K_): BOOLEAN
deferred function
Is there a value currently associated with key k?
at (k: K_): V_
deferred function
Return the value associated to key k.
infix "@" (k: K_): V_
frozen
effective function
The infix notation which is actually a synonym for at.
reference_at (k: K_): V_
deferred function
Return Void or the value associated with key k.
fast_has (k: K_): BOOLEAN
deferred function
Is there a value currently associated with key k?
fast_at (k: K_): V_
deferred function
Return the value associated to key k using basic = for comparison.
fast_reference_at (k: K_): V_
deferred function
Same work as reference_at, but basic = is used for comparison.
put (v: V_, k: K_)
deferred procedure
Change some existing entry or add the new one.
fast_put (v: V_, k: K_)
deferred procedure
Same job as put, but uses basic = for comparison.
add (v: V_, k: K_)
deferred procedure
To add a new entry k with its associated value v.
occurrences (v: V_): INTEGER_32
effective function
Number of occurrences using is_equal for comparison.
fast_occurrences (v: V_): INTEGER_32
effective function
Number of occurrences using basic = for comparison.
key_at (v: V_): K_
effective function
Retrieve the key used for value v using is_equal for comparison.
fast_key_at (v: V_): K_
effective function
Retrieve the key used for value v using = for comparison.
remove (k: K_)
deferred procedure
Remove entry k (which may exist or not before this call).
fast_remove (k: K_)
deferred procedure
Same job as remove, but uses basic = for comparison.
clear_count
deferred procedure
Discard all items (is_empty is True after that call).
clear_count_and_capacity
deferred procedure
Discard all items (is_empty is True after that call).
capacity: INTEGER_32
deferred function
Approximation of the actual internal storage capacity.
lower: INTEGER_32
constant attribute
Minimum index.
upper: INTEGER_32
effective function
Maximum index.
item (index: INTEGER_32): V_
deferred function
Item at the corresponding index i.
key (index: INTEGER_32): K_
deferred function
first: V_
effective function
The very first item.
last: V_
effective function
The last item.
get_new_iterator_on_items: ITERATOR[V_]
effective function
get_new_iterator_on_keys: ITERATOR[K_]
deferred function
key_map_in (buffer: COLLECTION[K_])
effective procedure
Append in buffer, all available keys (this may be useful to speed up the traversal).
item_map_in (buffer: COLLECTION[V_])
effective procedure
Append in buffer, all available items (this may be useful to speed up the traversal).
is_equal (other: DICTIONARY [V_, K_]): BOOLEAN
effective function
Do both dictionaries have the same set of associations?
is_equal_map (other: DICTIONARY [V_, K_]): BOOLEAN
effective function
Do both dictionaries have the same set of associations?
copy (other: DICTIONARY [V_, K_])
effective procedure
Reinitialize by copying all associations of other.
do_all (action: ROUTINE[TUPLE[TUPLE 2[V_, K_]]])
effective procedure
Apply action to every [V_, K_] associations of Current.
for_all (test: FUNCTION[TUPLE[TUPLE 2[V_, K_]]]): BOOLEAN
effective function
Do all [V_, K_] associations satisfy test?
exists (test: FUNCTION[TUPLE[TUPLE 2[V_, K_]]]): BOOLEAN
effective function
Does at least one [V_, K_] association satisfy test?
internal_key (k: K_): K_
deferred function
Retrieve the internal key object which correspond to the existing entry k (the one memorized into the Current dictionary).
valid_index (i: INTEGER_32): BOOLEAN
effective function
True when i is valid (i.e., inside actual bounds).
count: INTEGER_32
deferred function
Number of available indices.
get_new_iterator: ITERATOR[E_]
deferred function