summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f66481c)
Signed-off-by: Jean Privat <jean@pryen.org>
# Add each (key,value) of `map` into `self`.
# If a same key exists in `map` and `self`, then the value in self is discarded.
#
# Add each (key,value) of `map` into `self`.
# If a same key exists in `map` and `self`, then the value in self is discarded.
#
- # It is the analogous of `SimpleCollection::add_all`
- #
# var x = new HashMap[String, Int]
# x["four"] = 4
# x["five"] = 5
# var y = new HashMap[String, Int]
# y["four"] = 40
# y["nine"] = 90
# var x = new HashMap[String, Int]
# x["four"] = 4
# x["five"] = 5
# var y = new HashMap[String, Int]
# y["four"] = 40
# y["nine"] = 90
# assert x["four"] == 40
# assert x["five"] == 5
# assert x["nine"] == 90
# assert x["four"] == 40
# assert x["five"] == 5
# assert x["nine"] == 90
- fun recover_with(map: MapRead[K, V])
+ fun add_all(map: MapRead[K, V])
do
var i = map.iterator
while i.is_ok do
do
var i = map.iterator
while i.is_ok do
+ # Alias for `add_all`
+ fun recover_with(map: MapRead[K, V]) is deprecated do add_all(map)
+
# Remove all items
#
# var x = new HashMap[String, Int]
# Remove all items
#
# var x = new HashMap[String, Int]