Any container is in fact a model of a box which can contain something. The only thing we can do with such a container is to count the number of elements inside. Putting something in is more specialized - we have the possibility to attach a label to each item so that we can retrieve it later using this label, but we must not do so. In our design we have to attach labels to all elements of a container or to none. In the first case we call such container TABLE_, in the second one - LIST_.
In contrast to the "real life" situation our containers are not limited in size, i.e. we have no "bounded containers". Instead all containers are extended dynamically and only limited by the total working space of the computer system. This follows our philosophy to make life as easy as possible for our customers. But should you really want to get good control over the allocation of memory for new entries, you can do that.
As well lists and tables can be created in a unique or a non unique form. This means that for a list the same element can or can not be element more than once. In a table this is important for the key which must be unique or not. Groups LIST_ - TABLE_ are very similar. This is demonstrated by the following table.
creation | make (is_unique: BOOLEAN) |
|
search for a entry | search (x: G) |
search (k: H) |
add new entries | put (x: G) |
put (x: G; k: H) |
merging | merge (other: like Current) |
|
remove (one or more) entry or entries | remove (x: G) remove_all (x: G) |
remove (x: G; k: H) remove_all (k: H) |
remove all entries | wipe_out |
|
uniqueness | unique_items |
unique_keys |
status indicators | empty, found |
|
element included ? | has_item (x: G) |
has_key (k: H) |
entries | count |
|
duplicates | count_of (x: G) |
count_of (k: H) |
navigation | cursor_at (x: G) |
cursor_at (k: H |
item_at (cs: CURSOR_): G |