A hash table or hash map is a data structure that uses a hash function to map keys (e.g. a person's name), to their associated values (e.g. their address). Thus, a hash map implements an associative array. A hash function is used to transform the key into the index of an array element where the corresponding value is stored.

In many situations, the lookup of elements within hash tables turns out to be more efficient than within arrays - even if the hash map building time is taken into account. In a well-dimensioned hash table, the average lookup time is independent of the number of elements stored in the table.

The following operations are used to manipulate and access maps:

buildMap() builds a map from an array.
setMapValue() updates the value of a specific key.
getMapValue() gets the value of a specific key.
getMapEntries() gets all map entries to an array.
removeMapValue() removes the entry corresponding to a specific key.

The following sections describe the above operations in more detail.

Using Maps with the Memory Adapter

For more information on handling maps with the Memory Adapter, continue reading on Using the Memory Adapter with Maps.