Previous Topic: Event ObjectNext Topic: Out Object


Map Object

A class of objects that can be created using CreateObject. The class of objects represents a unique, sorted container that associates a string type Key with a Value of any type. No two elements in an object of class Map can have the same Key.

(<Key>)=<Value>

Inserts an element including a Key and a Value into the Map. If the Key already exists, the old Value is replaced with the new one.

(<Key>)

Returns a Value associated with a Key. If the Key is not found, Empty is returned.

KeysSet

This method returns a business logic map which contain <key, key> pairs, instead of an ordinary map, which contain <key, value> pairs. The new map has identical values in both keys, and is used as a list of the keys in the main map. This allows the user to iterate through the keys of the map using the VB call For Each.

Example:

dim map
set map = Tools.GetUserGroupDetails ("Authors")

dim KeysList
set KeysList=map.KeysSet
For Each element in KeysList
    Out.Log element, “I”
Next

Item(<Key>)=<Value>

Inserts an element including a Key and a Value into the Map. If the Key already exists, the old Value is replaced with the new one.

Item(<Key>)

Returns a Value associated with a Key. If the Key is not found, Empty is returned.

Count

Returns the number of objects currently stored in the Map.

Empty

Returns True if the number of objects in the Map is zero; otherwise, returns False.

Erase(<Key>)

Removes the Value associated with the Key from the Map.

Clear

Removes all elements from the Map.

Exist(<Key>)

Returns True if an element with the Key exists; otherwise, returns False.

Dump

Returns a string containing all Map information in a readable format.