![]() |
OTX Reference
|
|
Dictionary of key/value pairs. More...

Public Attributes | |
| MapLiteral | init |
| Cardinality [0..1] Initialisation of a Map declaration More... | |
| CountableType | keyType |
| Cardinality [1] Data type of the Map keys More... | |
| DataType | valueType |
| Cardinality [1] Data type of the Map values More... | |
Dictionary of key/value pairs.
An OTX Map contains of an arbitrary number of key/value pair items. At the declaration the map’s key and value data types must be defined. Map keys must be of countable type. All keys must be unique inside a map, because values in a map are accessed by their key. For the data type of the values, there are no restrictions other than that all values in a map must be of the same type.
Note: If a Map declaration is not explicitly initialized, an empty Map will be created and assigned to the Map. Note: IMPORTANT - The order in which the elements of a Map are returned is not defined!
| Conversion | Result | Sample |
|---|---|---|
| ToBoolean | Undefined, do not use it! | |
| ToInteger | Undefined, do not use it! | |
| ToFloat | Undefined, do not use it! | |
| ToString | Returns the Map as a String | String s = ToString({ 1:true, 2:false, 3:true }); // Returns "{ 1:true, 2:false, 3:true }"
|
| ToByteField | Undefined, do not use it! |
| MapLiteral OpenTestSystem.Otx.Core.DataTypes.Map.init |
Cardinality [0..1]
Initialisation of a Map declaration
This optional element stands for the initialisation of the Map at declaration time. Initialisation is done by using a recursive mechanism: E.g. A Map of Maps of Integer keys and Integer values is initialised by using Map literals for each Map key/value pair item again, and so on.
| CountableType OpenTestSystem.Otx.Core.DataTypes.Map.keyType |
Cardinality [1]
Data type of the Map keys