OTX Reference  
OpenTestSystem.Otx.Core.Terms.MapCreate Class Reference

Create a Map More...

Inheritance diagram for OpenTestSystem.Otx.Core.Terms.MapCreate:
Inheritance graph

Public Attributes

MapItems items
 Describes one or more elements for the List operation. More...
 
CountableType keyType
 Data type of the elements of a list or a map More...
 
DataType valueType
 Data type of the elements of a list or a map More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Terms.Term
MetaData metaData
 Store additional More...
 

Detailed Description

Create a Map

MapCreate is a term to create a new Map at runtime. It is generated by passing a set of key / value pairs.

Exceptions
Core.Exceptions.OutOfBoundsExceptionIt is thrown if two or more items in the literal have the same key.
Checker rules
CheckerRule.Core_Chk044 – no use of init in map key type definition
CheckerRule.Core_Chk045 – no use of init in map value type definition
CheckerRule.Core_Chk047MapLiteral and MapCreate key&value types follow key&value type definition

Syntax
MapTerm = MapCreate(CountableDataType, DataType, {CountableTerm1:Term1, CountableTerm2:Term2, ...});
Examples
// Local Declarations
Map<Integer, String> result;
// Flow
//Returns the result = {{1:"text1"}, {2;"text2"}};
result = MapCreate(Integer, String, { 1:"text1", 2:"text2"});

Member Data Documentation

◆ items

MapItems OpenTestSystem.Otx.Core.Terms.MapCreate.items

Describes one or more elements for the List operation.

◆ keyType

CountableType OpenTestSystem.Otx.Core.Terms.MapCreate.keyType

Data type of the elements of a list or a map

◆ valueType

DataType OpenTestSystem.Otx.Core.Terms.MapCreate.valueType

Data type of the elements of a list or a map