BRL.Map: Functions Source  


Functions

CreateMapCreate a map
ClearMapClear a map
MapIsEmptyCheck if a map is empty
MapInsertInsert a key/value pair into a map
MapValueForKeyFind a value given a key
MapContainsCheck if a map contains a key
MapRemoveRemove a key/value pair from a map
MapKeysGet map keys
MapValuesGet map values
CopyMapCopy a map

Function reference

Function CreateMap:TMap()
ReturnsA new map object
DescriptionCreate a map

Function ClearMap( map:TMap )
DescriptionClear a map
Information ClearMap removes all keys and values from map

Function MapIsEmpty( map:TMap )
ReturnsTrue if map is empty, otherwise false
DescriptionCheck if a map is empty

Function MapInsert( map:TMap,key:Object,value:Object )
DescriptionInsert a key/value pair into a map
Information If map already contained key, it's value is overwritten with value.

Function MapValueForKey:Object( map:TMap,key:Object )
ReturnsThe value associated with key
DescriptionFind a value given a key
Information If map does not contain key, a Null object is returned.

Function MapContains( map:TMap,key:Object )
ReturnsTrue if map contains key
DescriptionCheck if a map contains a key

Function MapRemove( map:TMap,key:Object )
DescriptionRemove a key/value pair from a map

Function MapKeys:TMapEnumerator( map:TMap )
ReturnsAn iterator object
DescriptionGet map keys
Information The object returned by MapKeys can be used with EachIn to iterate through the keys in map.

Function MapValues:TMapEnumerator( map:TMap )
ReturnsAn iterator object
DescriptionGet map values
Information The object returned by MapValues can be used with EachIn to iterate through the values in map.

Function CopyMap:TMap( map:TMap )
ReturnsA copy of map
DescriptionCopy a map