Ember.MapWithDefault Class
Constructor
Ember.MapWithDefault
(
private
-
[options]
Parameters:
-
[options]
Object optional-
[defaultValue]
optional
-
Methods
clear
()
private
create
(
Ember.MapWithDefault | Ember.Map
private
static
-
[options]
Parameters:
-
[options]
Object optional-
[defaultValue]
optional
-
Returns:
Ember.MapWithDefault | Ember.Map:
If options are passed, returns
Ember.MapWithDefault
otherwise returns Ember.Map
delete
(
Boolean
private
-
key
Removes a value from the map for an associated key.
Parameters:
-
key
Returns:
Boolean:
true if an item was removed, false otherwise
forEach
(
private
-
callback
-
self
Iterate over all the keys and values. Calls the function once for each key, passing in value, key, and the map being iterated over, in that order.
The keys are guaranteed to be iterated over in insertion order.
Parameters:
-
callback
Function -
self
if passed, the
this
value inside the callback. By default,this
is the map.
get
(
private
-
key
Retrieve the value associated with a given key.
Parameters:
-
key
Returns:
:
the value associated with the key, or the default value
has
(
Boolean
private
-
key
Check whether a key is present.
Parameters:
-
key
Returns:
Boolean:
true if the item was present, false otherwise
Properties
size
Number
private
This property will change as the number of objects in the map changes.
Default: 0