Class Collections.HashMap

HashMap

Class Summary
Constructor Attributes Constructor Name and Description
 
A HashMap is a Collection that cannot contain duplicate keys.It keeps key value pair in the Datastructure.

Method Summary

Class Detail

Collections.HashMap()
A HashMap is a Collection that cannot contain duplicate keys.It keeps key value pair in the Datastructure.
require('Collections').HashMap()

Method Detail

  • <static> {boolean} Collections.HashMap.containsKey(key)
    checks whether the provided key exists in the HashMap or not.
    Parameters:
    {Object} key
    Returns:
    {boolean}
  • <static> {Object[]} Collections.HashMap.get(key)
    returns the item associated with the key
    Parameters:
    {Object} key
    Returns:
    {Object[]} Object
  • <static> {Object[]} Collections.HashMap.getKeys()
    returns an Array of the key items
    Returns:
    {Object[]} keyArray
  • <static> {String} Collections.HashMap.objType()
    returns the Object Type as HashMap
    Returns:
    {String}
  • <static> {Object[]} Collections.HashMap.put(key, value)
    insert an Item to the Hashmap with teh provided key, if the key is already exists, then the value will be replaced.
    Parameters:
    {Object} key
    {Object} value
    Returns:
    {Object[]} Object
  • <static> {null} Collections.HashMap.remove(key)
    remove the key and the value from the HashMap
    Parameters:
    {Object} key
    Returns:
    {null}