API Docs for: v2.1.0
Show:

CGSGMap Class

Module: Util

A Hashmap class.

Constructor

CGSGMap

()

Methods

addOrReplace

(
  • key
  • value
)

Add or replace the key in the map with the value.

Parameters:

Returns:

the index of the key in the map

clone

() CGSGMap

Returns:

containsKey

(
  • key
)
Boolean

Return true if the key already exists in the map

Parameters:

Returns:

getAt

(
  • index
)
Object

Parameters:

Returns:

Object:

{key, value}

getKeyIndex

(
  • key
)
Number

Parameters:

Returns:

Number:

The key index or -1 if not exists

getLength

() Number

Return the number of keys in the map

Returns:

getValue

(
  • key
)
Object

Parameters:

Returns:

Object:

the corresponding value or null if the key does not exist

getValues

() Array

Returns:

remove

(
  • key
)

Parameters:

removeAll

()

Remove all keys in the map