Index


Class wsc.Map

An object that maps keys to values.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Returns true if this map contains a mapping for the specified key.
 
Returns true if this map maps one or more keys to the specified value.
 
get(key)
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
 
keys()
Returns a {Array} of the keys contained in this map.
 
put(key, value)
Associates the specified value with the specified key in this map.
 
remove(key)
Removes the mapping for a key from this map if it is present.
 
size()
Returns the number of key-value mappings in this map.
 
Returns a {Array} of the values contained in this map.
Class Detail
wsc.Map()
Method Detail
containsKey(key)
Returns true if this map contains a mapping for the specified key.
Parameters:
{String} key
the key whose presence in this map is to be tested

containsValue(value)
Returns true if this map maps one or more keys to the specified value.
Parameters:
{String} value
the value whose presence in this map is to be tested

{object} get(key)
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
Parameters:
{String} key
the key whose associated value is to be returned
Returns:
{object} the value to which the specified key is mapped, or null if this map contains no mapping for the key

{Array} keys()
Returns a {Array} of the keys contained in this map.
Returns:
{Array} an array of the keys contained in this map.

put(key, value)
Associates the specified value with the specified key in this map.
Parameters:
{String} key
key with which the specified value is to be associated
{Object} value
value to be associated with the specified key

remove(key)
Removes the mapping for a key from this map if it is present.
Parameters:
{String} key
key whose mapping is to be removed from the map

{number} size()
Returns the number of key-value mappings in this map.
Returns:
{number} the number of key-value mappings in this map.

{Array} values()
Returns a {Array} of the values contained in this map.
Returns:
{Array} an array view of the values contained in this map

Copyright © 2005, 2013, Oracle and/or its affiliates. All rights reserved.