Token list, list, map

Scope/Lifetime

Live in the profile (and not in other profiles) during the profile run/test. Exception: Serialisation (see below).

Lists


Our documentation uses the term list with two different meanings. Token list (also 'comma separated list') and list.


  • Tokens inside of a token list are text sections, separated from each other by a delimiter, e.g. a comma.

  • A token list is a list of tokens (values) inside of a string, separated by a comma or another delimiter. The occurrence of the delimiter itself is not allowed in one of the tokens. E.g. used in function "replace-chars()".

  • A list is an object referenced by a name and in which multiple typed values can be stored in numeric order. The order is defined by the sequence of adding items to this list object. After this, a single value can be accessed via the value's index number in the list and the list name. If the list name is not specified, then name default is used.

Serialised/Autoserialised lists


See functions serialize map/list() and deserialize map/list().

Maps

A map object can save multiple typed values, analogous to a list. But the values are not ordered and thus cannot be addressed by an index. They must be accessed later on by a unique key and the map's name. If the name is not specified, then the name default is used.

Serialised/Autoserialised maps


See functions serialize map/list() and deserialize map/list().

Notes


  • Lists, maps, and value splitters use separate namespaces. In consequence, the name of a list can also be used as the name of a map. There are no relations between the list and the map with the same names.

  • Lists and maps are objects that are kept in the main memory. Therefore, the number and size of these objects are limited by the available main memory. This is also true for variables of type String and therefore for token lists. Storing too many values in map or list objects can lead to a memory overflow (OutOfMemoryError). If you have to deal with mass data, please use a database table instead. List and map objects are (dynamically) created during runtime when they are first used and exist till the end of the profile job. So they can be used (like variables) to pass on data between records. To empty map or list objects at the beginning of a record (or elsewhere), please use the 'clear' functions.