|
Scala 2.3.3.10048
|
abstract
trait
Map
[A, B]
extends
java.lang.Object
with
scala.collection.Map[A, B]
with
scala.collection.mutable.Scriptable[scala.collection.mutable.Message[scala.Tuple2[A, B]]]
with
scala.ScalaObject
Class Summary | |
class
MapTo
|
Def Summary | |
def
+
(kv1: scala.Tuple2[A, B], kv2: scala.Tuple2[A, B], kvs: {A, B}*)
: scala.collection.mutable.Map[A, B]
Add two or more key/value pairs to this map. |
|
def
+
(kv: scala.Tuple2[A, B])
: scala.collection.mutable.Map[A, B]
Add a key/value pair to this map. |
|
def
++
(kvs: scala.Iterable[scala.Tuple2[A, B]])
: scala.collection.mutable.Map[A, B]
Add a sequence of key/value pairs to this map. |
|
def
++
(kvs: scala.Iterator[scala.Tuple2[A, B]])
: scala.collection.mutable.Map[A, B]
Add a sequence of key/value pairs to this map. |
|
def
++=
(kvs: scala.Iterable[scala.Tuple2[A, B]])
: scala.Unit
Add a sequence of key/value pairs to this map. |
|
def
++=
(kvs: scala.Iterator[scala.Tuple2[A, B]])
: scala.Unit
Add a sequence of key/value pairs to this map. |
|
def
+=
(key: A)
: Map.this.MapTo
This method defines syntactic sugar for adding or modifying mappings. It is typically used in the following way: map += key -> value; |
|
def
+=
(kv1: scala.Tuple2[A, B], kv2: scala.Tuple2[A, B], kvs: {A, B}*)
: scala.Unit
Add two or more key/value pairs to this map. |
|
def
+=
(kv: scala.Tuple2[A, B])
: scala.Unit
Add a key/value pair to this map. |
|
def
-
(key1: A, key2: A, keys: A*)
: scala.collection.mutable.Map[A, B]
Remove two or more keys from this map |
|
def
-
(key: A)
: scala.collection.mutable.Map[A, B]
Remove a key from this map |
|
def
--
(keys: scala.Iterable[A])
: scala.collection.mutable.Map[A, B]
Remove a sequence of keys from this map |
|
def
--
(keys: scala.Iterator[A])
: scala.collection.mutable.Map[A, B]
Remove a sequence of keys from this map |
|
def
--=
(keys: scala.Iterable[A])
: scala.Unit
Remove a sequence of keys from this map |
|
def
--=
(keys: scala.Iterator[A])
: scala.Unit
Remove a sequence of keys from this map |
|
def
-=
(key1: A, key2: A, keys: A*)
: scala.Unit
Remove two or more keys from this map |
|
abstract
|
def
-=
(key: A)
: scala.Unit
Remove a key from this map, noop if key is not present. |
def
<<
(cmd: scala.collection.mutable.Message[scala.Tuple2[A, B]])
: scala.Unit
Send a message to this scriptable object. |
|
def
clear
: scala.Unit
Removes all mappings from the map. After this operation is completed, the map is empty. |
|
override
|
def
clone
: scala.collection.mutable.Map[A, B]
Return a clone of this map. |
def
excl
(keys: A*)
: scala.Unit
This method will remove all the mappings for the given sequence of keys from the map. |
|
override
|
def
filter
(p: (scala.Tuple2[A, B]) => scala.Boolean)
: scala.Iterable[scala.Tuple2[A, B]]
This method removes all the mappings for which the predicate p returns false .
|
def
incl
(mappings: {A, B}*)
: scala.Unit
incl can be used to add many mappings at the same time
to the map. The method assumes that a mapping is represented
by a Pair object who's first component denotes the
key, and who's second component refers to the value.
|
|
def
retain
(p: (A, B) => scala.Boolean)
: scala.Unit
This method retains only those mappings for which the predicate p returns true .
|
|
def
transform
(f: (A, B) => B)
: scala.Unit
This function transforms all the values of mappings contained in this map with function f .
|
|
abstract
|
def
update
(key: A, value: B)
: scala.Unit
This method allows one to add a new mapping from key
to value to the map. If the map already contains a
mapping for key , it will be overridden by this
function.
|
Def inherited from scala.collection.Map[A, B] | |
apply , contains, default, equals, get, hashCode, isDefinedAt, isEmpty, keySet, keys, size, toString, values |
Def inherited from scala.collection.mutable.Scriptable[scala.collection.mutable.Message[scala.Tuple2[A, B]]] | |
<< |
Def Detail |
def
+
(kv1: scala.Tuple2[A, B], kv2: scala.Tuple2[A, B], kvs: {A, B}*): scala.collection.mutable.Map[A, B]
kv1 -
the first key/value pair.
kv2 -
the second key/value pair.
kvs -
the remaining key/value pairs.
def
+
(kv: scala.Tuple2[A, B]): scala.collection.mutable.Map[A, B]
kv -
the key/value pair.
def
++
(kvs: scala.Iterable[scala.Tuple2[A, B]]): scala.collection.mutable.Map[A, B]
kvs -
the iterable object containing all key/value pairs.
def
++
(kvs: scala.Iterator[scala.Tuple2[A, B]]): scala.collection.mutable.Map[A, B]
kvs -
the iterator containing all key/value pairs.
def
++=
(kvs: scala.Iterable[scala.Tuple2[A, B]]): scala.Unit
kvs -
the iterable object containing all key/value pairs.
def
++=
(kvs: scala.Iterator[scala.Tuple2[A, B]]): scala.Unit
kvs -
the iterator containing all key/value pairs.
def
+=
(key: A): Map.this.MapTo
map += key -> value;
+={key, value}
def
+=
(kv1: scala.Tuple2[A, B], kv2: scala.Tuple2[A, B], kvs: {A, B}*): scala.Unit
kv1 -
the first key/value pair.
kv2 -
the second key/value pair.
kvs -
the remaining key/value pairs.
def
+=
(kv: scala.Tuple2[A, B]): scala.Unit
kv -
the key/value pair.
key1 -
the first key to be removed
key2 -
the second key to be removed
keys -
the remaining keys to be removed
def
-
(key: A): scala.collection.mutable.Map[A, B]
key -
the key to be removed
key
removed if it existed.
def
--
(keys: scala.Iterable[A]): scala.collection.mutable.Map[A, B]
keys -
the keys to be removed
keys
removed.
def
--
(keys: scala.Iterator[A]): scala.collection.mutable.Map[A, B]
keys -
the keys to be removed
keys
removed.
def
--=
(keys: scala.Iterable[A]): scala.Unit
keys -
the keys to be removed
def
--=
(keys: scala.Iterator[A]): scala.Unit
keys -
the keys to be removed
def
-=
(key1: A, key2: A, keys: A*): scala.Unit
key1 -
the first key to be removed
key2 -
the second key to be removed
keys -
the remaining keys to be removed
abstract
def
-=
(key: A): scala.Unit
key -
the key to be removed
def
<<
(cmd: scala.collection.mutable.Message[scala.Tuple2[A, B]]): scala.Unit
cmd -
the message to send.
def
clear
: scala.Unit
override
def
clone
: scala.collection.mutable.Map[A, B]
def
excl
(keys: A*): scala.Unit
keys -
-=
override
def
filter
(p: (scala.Tuple2[A, B]) => scala.Boolean): scala.Iterable[scala.Tuple2[A, B]]
p
returns false
.p -
def
incl
(mappings: {A, B}*): scala.Unit
incl
can be used to add many mappings at the same time
to the map. The method assumes that a mapping is represented
by a Pair
object who's first component denotes the
key, and who's second component refers to the value.mappings -
+=
def
retain
(p: (A, B) => scala.Boolean): scala.Unit
p
returns true
.p -
The test predicate
def
transform
(f: (A, B) => B): scala.Unit
f
.f -
The transformation to apply
abstract
def
update
(key: A, value: B): scala.Unit
key
to value
to the map. If the map already contains a
mapping for key
, it will be overridden by this
function.key -
The key to update
value -
The new value