CGSGMap Class
A Hashmap class.
Constructor
CGSGMap
()
Item Index
Methods
addOrReplace
(
-
key
-
value
Add or replace the key in the map with the value.
Returns:
the index of the key in the map
containsKey
(
Boolean
-
key
Return true if the key already exists in the map
Parameters:
-
key
Object
Returns:
getKeyIndex
(
Number
-
key
Parameters:
-
key
Object
Returns:
Number:
The key index or -1 if not exists
getValue
(
Object
-
key
Parameters:
-
key
Object
Returns:
Object:
the corresponding value or null if the key does not exist
removeAll
()
Remove all keys in the map