Class cwi.adt.Hashtable
Defined in: cwi.adt.js.
Constructor Summary
Method Summary
toString()
Return a string representation of the Hashtable object in the form of a set of entries, enclosed in braces and separated by the ASCII characters " ; " (semicolon and space).
Constructor Detail
Method Detail
put(key, value)
Store an element related to a given key.
Parameters:
{string} | key | key name |
{Object} | value | the object to be inserted |
get(key)
: Object
Return an element related to a given key.
Parameters:
{string} | key | key name |
Returns:
{Object} | The object related to the given key |
remove(key)
: Object
Remove and return the element given its key.
Parameters:
{string} | key | key name |
Returns:
{Object} |
toString()
: string
Return a string representation of the Hashtable object in the form of a set of entries,
enclosed in braces and separated by the ASCII characters " ; " (semicolon and space).
Each entry is rendered as the key, an equals sign =, and the associated element,
where the toString method is used to convert the key and element to strings.
Returns:
{string} |