(Changed in version 2.8.0) + creates a new map. Use += to add an element to this map and return that map itself.
(Changed in version 2.8.0) + creates a new map. Use += to add an element to this map and return that map itself.
(Changed in version 2.8.0) ++ creates a new map. Use ++= to add an element to this map and return that map itself.
(Changed in version 2.8.0) - creates a new map. Use -= to remove an element from this map and return that map itself.
(Changed in version 2.8.0) - creates a new map. Use -= to remove an element from this map and return that map itself.
(Changed in version 2.8.0) -- creates a new map. Use --= to remove an element from this map and return that map itself.
(Changed in version 2.9.0) The behavior of scanRight has changed. The previous behavior can be reproduced with scanRight.reverse.
(Changed in version 2.9.0) transpose throws an IllegalArgumentException if collections are not uniformly sized.
(Changed in version 2.8.0) values returns Iterable[B] rather than Iterator[B].
(dictionary: WrappedDictionary[A]).clone()
(dictionary: WrappedDictionary[A]).equals(that)
(dictionary: WrappedDictionary[A]).hashCode()
(dictionary: WrappedDictionary[A]).toString()
Dictionary "view" of a JavaScript value.
Using objects as dictionaries (maps from strings to values) through their properties is a common idiom in JavaScript. This trait lets you treat an object as such a dictionary, with the familiar API of a Map.
To use it, cast your object, say
x, into a Dictionary usingthen use it as
To enumerate all the keys of a dictionary, use collection methods or for comprehensions. For example:
Note that this does not enumerate properties in the prototype chain of
xDict.This trait extends js.Any directly, because it is not safe to call methods of js.Object on it, given that the name of these methods could be used as keys in the dictionary.