| Overview | Module | Function | Class | Tea 3.2.4 Reference Documentation © 2009 PDM&FC |
THashtable
THashtable represents a set of unordered objects.
Each object in the set is indexed by a key. A key is an object of
any type. A THashtable can be thought of as a sequence
of key, value pairs.
|
|
THashtable addElements elementData
Adds multiple elements to this table.
THashtable object for which
the method was called.
elementData argument defines the objects to
add to this table. Each element in the elementData
is a two element list. The first is used as the key and the second
is used as the value.
This method could be implemented in the following way:
method THashtable addElements ( elemList ) {
foreach elemData $elemList {
apply $this put $elemData
}
is $this
}
THashtable clear
Removes all the elements from the THashtable.
THashtable object for which
the method was called.
THashtable constructor
Initializes an empty hashtable.
THashtable get key
Fetches an object stored in the THashtable.
key.
The null object if there is no object associated with key
stored in the THashtable. You can check if
there is an element indexed by key my calling the
THashtable isKey method.
THashtable getElements
Fetches a list of the objects stored in the
THashtable.
THashtable.
THashtable getKeys
Fetches a list of the keys of the objects stored in the
THashtable.
THashtable.
THashtable isKey object
Checks if an object is being used as key for one of the elements in
the THashtable.
object is being used as key for one of
the elements in the THashtable.
False otherwise.
THashtable put key value
Adds an object to the THashtable.
value.
THashtable.
THashtable object for which
the method was called.
THashtable then value will take
its place.
THashtable remove [key ...]
Removes one or more elements from the THashtable.
THashtable object for which
the method was called.
THashtable associated
with each of the keys given as arguments.
If there is no object indexed by key in the
THashtable then it has no effect.
| Overview | Module | Function | Class | Tea 3.2.4 Reference Documentation © 2009 PDM&FC |