Difference between revisions of "Core.Terms.MapCreate"

From emotive
Jump to navigation Jump to search
 
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''MapCreate'''}}[[Category:Core]]
 
{{DISPLAYTITLE:OTX '''MapCreate'''}}[[Category:Core]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | MapCreate | Creates a new object of type map at run time | [[Term]] | [[OtxReference#Core|OTX Core library]] | [[Creation terms]] | [[Core.Actions.Throw.Exception.OutOfBoundsException|OutOfBoundsException]] | [[Core.Validation.CoreChk044|Core_Chk044]]<br/>[[Core.Validation.CoreChk045|Core_Chk045]]}}
+
{{ClassificationActivity | MapCreate | Creates a new object of type map at run time | [[Term]] | [[Core|OTX Core library]] | [[Creation terms]] | [[Core.Actions.Throw.Exception.OutOfBoundsException|OutOfBoundsException]] | [[Core.Validation.CoreChk044|Core_Chk044]]<br/>[[Core.Validation.CoreChk045|Core_Chk045]]}}
  
 
== OTL Syntax ==
 
== OTL Syntax ==

Latest revision as of 10:45, 16 February 2016

Classification

Name MapCreate
Short Description Creates a new object of type map at run time
Class Term
Extension OTX Core library
Group Creation terms
Exceptions OutOfBoundsException
Checker Rules Core_Chk044
Core_Chk045
Standard Compliant Yes

OTL Syntax

MapTerm = MapCreate(CountableDataType, DataType, {CountableTerm1:Term1, CountableTerm2:Term2, ...});

Description

MapCreate is a term to create a new map at run time. It is produced by passing a set of key/value pairs.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Map The newly created map

Properties

Name Data Type Class Default Cardinality Description
KeyType DataType Name - [1] Data type of the keys
ItemType DataType Name - [1] Data type of the values
MapItems - Term - [1] List of one or more key/value pairs of the respective type. No elements are specified, an empty map is generated.

OTL Examples

Map<Integer,String> result;
result = MapCreate(Integer, String, {1:"text1", 2:"text2"});
//Returns the result = {{1, "text1"}, {2, "text2"}}

See also

ListCreate
UserExceptionCreate