HashMap Class

Hashmap is a helper class useful for:

Hashmap Code Sample

Constructor : Hashmap()

Empty constructor

keys property

This contains the list of keys for the hahmap as a javascript array. This is a stadanrd javascript array.
    var map = new HashMap();
    ....
    for (var i = 0; i < map.keys.length; i++) {
        var key = map.keys[i];
        ...
    }

set(key, value)

Stores the value object with a key. Both key and value can be any type.
    var map = new HashMap();
    map.set("mykey", 345);
    map.set(Date.monthSart(), {label:"Hello", count:345});

get(key)

Returns the value object for the key or null if not found

increment(key, amount)

Icnrement by amount the integer value corresponding to key. If the current value was not defined it is set to 0.