Difference between revisions of "Core.DataTypes.ComplexDataType.Map"

From emotive
Jump to navigation Jump to search
 
Line 1: Line 1:
 
{{DISPLAYTITLE:Data Type '''Map'''}}
 
{{DISPLAYTITLE:Data Type '''Map'''}}
 
== Classification ==
 
== Classification ==
{{ClassificationDataType | Map | Collection of key-value pairs of the same type | [[Core.DataTypes.SimpleDataType|Simple Data Type]] | [[Core.DataTypes.ComplexDataType.ComplexType|ComplexType]] | DefaultValue=An empty map|Literal=Yes | SpecifiedBy=[http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=53509 ISO 13209-2] }}
+
{{ClassificationDataType | Map | Collection of key-value pairs of the same type | [[Core.DataTypes.SimpleDataType|Simple Data Type]] | [[Core.DataTypes.ComplexDataType.ComplexType|ComplexType]] | DefaultValue=An empty map|Literal=Yes | SpecifiedBy={{OtxSpec2}}<!-- Go to the Template:OtxSpec2 in case of updating the info --> }}
  
 
== Description ==
 
== Description ==

Latest revision as of 08:55, 12 September 2019

Classification

Name Map
Short Description Collection of key-value pairs of the same type
Class Simple Data Type
Base Data Type ComplexType
Default Value An empty map
Provide a Literal Yes
SpecifiedBy ISO 13209-2
Standard Compliant Yes

Description

The Map data type identifies OTX in a number of zero or more key-value pairs. When you declare the type of the key and the type of the value must be specified. Within a Map keys must be unique. Via the key is accessed, the values ​​in the map.

Core Conversion

The following table shows the rules for conversion to another data type:

Conversion Result Sample
ToBoolean Undefined (should not be used)
ToInteger Undefined (should not be used)
ToFloat Undefined (should not be used)
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 (should not be used)

Sample

Map<Integer, Boolean> MapVariable = {1:true, 2:false, 3:true};