|
Scala
1.2.0.1 |
|||
scala.collection.Map
as well as for update
,
and remove
.
Method Summary | |
def ++=(map: Iterable[Tuple2[A,B]]): Unit
This method adds all the mappings provided by an iterator of parameter map to the map.
|
|
def ++=(it: Iterator[Tuple2[A,B]]): Unit
This method adds all the mappings provided by an iterator of parameter map to the map.
|
|
def +=(key: A): MapTo
This method defines syntactic sugar for adding or modifying mappings. |
|
def --=(keys: Iterable[A]): Unit
This method removes all the mappings for keys provided by an iterator over the elements of the keys object.
|
|
def --=(it: Iterator[A]): Unit
This method removes all the mappings for keys provided by an iterator over the elements of the keys object.
|
|
abstract
|
def -=(key: A): Unit
This method removes a mapping from the given key .
|
def <<(cmd: Message[Tuple2[A,B]]): Unit
Send a message to this scriptable object. |
|
def clear: Unit
Removes all mappings from the map. |
|
override
|
def clone(): Map[A,B]
Return a clone of this map. |
def excl(keys: A*): Unit
This method will remove all the mappings for the given sequence of keys from the map. |
|
def filter(p: (A,B) => Boolean): Unit
This method removes all the mappings for which the predicate p returns false .
|
|
override
|
def hashCode(): Int
The hashCode method always yields an error, since it is not safe to use mutable maps as keys in hash tables. |
def incl(mappings: Tuple2[A,B]*): Unit
incl can be used to add many mappings at the same time
to the map.
|
|
def map(f: (A,B) => B): Unit
This function transforms all the values of mappings contained in this map with function f .
|
|
def mappingToString(p: Tuple2[A,B]): String
This method controls how a mapping is represented in the string representation provided by method toString .
|
|
override
|
def toString(): String
Returns a string representation of this map which shows all the mappings. |
abstract
|
def update(key: A, value: B): Unit
This method allows one to add a new mapping from key
to value to the map.
|
Methods inherited from java/lang/Object-class |
eq, finalize, getClass, notify, notifyAll, synchronized, wait, wait, wait |
Methods inherited from scala/Any-class |
!=, ==, asInstanceOf, isInstanceOf, match |
Methods inherited from scala/Iterable-class |
/:, :\, elements, exists, find, foldLeft, foldRight, forall, foreach, sameElements |
Methods inherited from scala/collection/Map-class |
apply, contains, equals, exists, forall, foreach, get, isDefinedAt, isEmpty, keys, size, toList, values |
Method Detail |
abstract def update(key: A, value: B): Unit
key
to value
to the map. If the map already contains a
mapping for key
, it will be overridden by this
function.
def +=(key: A): MapTo
map += key -> value;
def ++=(map: Iterable[Tuple2[A,B]]): Unit
map
to the map.
def ++=(it: Iterator[Tuple2[A,B]]): Unit
map
to the map.
def incl(mappings: Tuple2[A,B]*): 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.
abstract def -=(key: A): Unit
key
.
If the map does not contain a mapping for the given key, the
method does nothing.
def --=(keys: Iterable[A]): Unit
keys
object.
def --=(it: Iterator[A]): Unit
keys
object.
def excl(keys: A*): Unit
def clear: Unit
def map(f: (A,B) => B): Unit
f
.
def filter(p: (A,B) => Boolean): Unit
p
returns false
.
def <<(cmd: Message[Tuple2[A,B]]): Unit
cmd
-
the message to send.
override def clone(): Map[A,B]
override def hashCode(): Int
override def toString(): String
def mappingToString(p: Tuple2[A,B]): String
toString
.
|
Scala
1.2.0.1 |
|||