| goog.structs.Map |
| goog.ui.Dialog.ButtonSet | goog.structs.Map |
|
opt_map
: *
Map or Object to initialize the map with.
|
|
var_args
: *
If 2 or more arguments are present then they will be used as key-value pairs.
|
|
Returns an iterator that iterates over the values or the keys in the map.
This throws an exception if the map was mutated since the iterator was
created.
Arguments:
Returns:
An iterator over the values or keys in the map.
|
code » | |||
addAll(map)
Adds multiple key-value pairs from another goog.structs.Map or Object.
Arguments:
|
code » | |||
clear()
Removes all key-value pairs from the map.
|
code » | |||
|
Clones a map and returns a new map.
Returns:
A new map with the same key-value pairs.
|
code » | |||
|
Whether the map contains the given key.
Arguments:
Returns:
Whether the map contains the key.
|
code » | |||
|
Whether the map contains the given value. This is O(n).
Arguments:
Returns:
Whether the map contains the value.
|
code » | |||
|
Whether this map is equal to the argument map.
Arguments:
Returns:
Whether the maps are equal.
|
code » | |||
get(key, opt_val)
⇒ *
Returns the value for the given key. If the key is not found and the default
value is not given this will return
undefined.
Arguments:
Returns:
*
The value for the given key.
|
code » | |||
|
No description.
Returns:
The number of key-value pairs in the map.
|
code » | |||
|
Returns an iterator that iterates over the keys in the map. Removal of keys
while iterating might have undesired side effects.
Returns:
An iterator over the keys in the map.
|
code » | |||
|
Gets the key part of a string.
|
code » | |||
|
Returns the keys of the map.
Returns:
Array of string values.
|
code » | |||
|
Returns an iterator that iterates over the values in the map. Removal of
keys while iterating might have undesired side effects.
Returns:
An iterator over the values in the map.
|
code » | |||
|
Returns the values of the map.
Returns:
The values in the map.
|
code » | |||
|
No description.
Returns:
Whether the map is empty.
|
code » | |||
|
Removes a key-value pair based on the key. This is O(logN) amortized due to
updating the keys array whenever the count becomes half the size of the keys
in the keys array.
Arguments:
Returns:
Whether object was removed.
|
code » | |||
set(key, value)
Adds a key-value pair to the map.
Arguments:
|
code » | |||
|
No description.
Returns:
Object representation of the map.
|
code » | |||
|
Returns a new map in which all the keys and values are interchanged
(keys become values and values become keys). If multiple keys map to the
same value, the chosen transposed value is implementation-dependent.
It acts very similarly to {goog.object.transpose(Object)}.
Returns:
The transposed map.
|
code » |
|
The number of key value pairs in the map.
|
Code » | |
|
Underlying JS object used to implement the map.
|
Code » | |
|
A map of internal keys that are numeric and should be cast back to a
number on retrieval.
A previous implementation had optimizations for IE6's bad GC. However,
the keys weren't correctly cast to strings so people started to depend on
the behavior of numeric keys in tests.
To ensure backwards compatibility this part remains, but it would be nice
to strip out entirely. See http://b/5622311.
|
Code » | |
|
Version used to detect changes while iterating.
|
Code » |
goog.structs.Map.call()
No description.
|
code » | |||
|
Default equality test for values.
Arguments:
Returns:
Whether a and b reference the same object.
|
code » | |||
|
Checks to see if a string is a valid map key
|
code » | |||
|
Makes a key string, i.e. "foo" -> ":foo"
Arguments:
Returns:
Key string.
|
code » |