Difference between revisions of "Core.Terms.MapCreate"
Jump to navigation
Jump to search
(Created page with "Category:Core == Classification == {{ClassificationActivity | MapCreate | Creates a new object of type map at run time | Term | OTX Core library | Creation...") |
(No difference)
|
Revision as of 07:57, 13 August 2014
Contents
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 |
Pseudo-Code Syntax
Map MapCreate(DataType keyType, DataType itemType, Map items);
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.
![]()
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. |
Examples
Map<Integer,String> result = MapCreate(Integer, String, 1, "text1", 2, "text2");
//Returns the result = {{1, "text1"}, {2, "text2"}}