make | Creates and returns a new Map, containing the mappings supplied. |
addMappings | Adds mappings to this Map and returns Map to allow chaining. |
makeSet | Modifies the methods of the supplied map in place to create an object following the set contract. |
orderedEquals | Returns true iff both maps contain the same mappings AND the same iteration order. |
toString | Returns a string representation of map. |
unorderedEquals | Returns true if both maps have the same size and contain the same mappings. |
valIter | Equivalent to Map:iter() except that iteration steps return elements in the order val,key instead of key,val. |
Map:make(mappings [, vals])input can be one of several types:
Map:make{a=1,b=2,c=3,d=4,e=5}
== Map:make(iter.zip("abcde",iter.count()))
== Map:make("abcde",iter.count())
== Map:make(Map:make{a=1,b=2,c=3,d=4,e=5})
Map:addMappings(mappings, vals)input can be one of several types:
Map:addMappings{a=1,b=2,c=3,d=4,e=5}
== Map:addMappings(iter.zip("abcde",iter.count()))
== Map:addMappings("abcde",iter.count())
== Map:addMappings(Map:addMappings{a=1,b=2,c=3,d=4,e=5})
maps.makeSet(map)This function is used to create the SkipSet and LinkedSet 'classes': SkipSet = maps.makeSet(SkipMap:new()) LinkedSet = maps.makeSet(LinkedMap:new())
maps.orderedEquals(map1, map2)This is typically not the function that would be used for equality comparisons of map. See maps.unorderedEquals.
maps.toString(map)Example:
> x = HashMap:make{a=1,b=2,c=3,d=4}
> print(x)
{a=1, d=4, c=3, b=2}
maps.unorderedEquals(map1, map2)
Map:valIter()