|
Scala
1.4.0.3 |
|||
Map
functions of the class into which it is mixed in.
Method Summary | |
override
|
def ++=(map: Iterable[Tuple2[A,B]]): Unit
This method adds all the mappings provided by an iterator of parameter map to the map.
|
override
|
def ++=(it: Iterator[Tuple2[A,B]]): Unit
This method adds all the mappings provided by an iterator of parameter map to the map.
|
override
|
def --=(keys: Iterable[A]): Unit
This method removes all the mappings for keys provided by an iterator over the elements of the keys object.
|
override
|
def --=(it: Iterator[A]): Unit
This method removes all the mappings for keys provided by an iterator over the elements of the keys object.
|
override
|
def -=(key: A): Unit
This method removes a mapping from the given key .
|
override
|
def <<(cmd: Message[Tuple2[A,B]]): Unit
Send a message to this scriptable object. |
override
|
def apply(key: A): B
Retrieve the value which is associated with the given key. |
override
|
def clear: Unit
Removes all mappings from the map. |
override
|
def clone(): Map[A,B]
Return a clone of this map. |
override
|
def contains(key: A): Boolean
Is the given key mapped to a value by this map? |
override
|
def excl(keys: A*): Unit
This method will remove all the mappings for the given sequence of keys from the map. |
override
|
def filter(p: (A,B) => Boolean): Unit
This method removes all the mappings for which the predicate p returns false .
|
override
|
def foreach(f: (A,B) => Unit): Unit
Executes the given function for all (key, value) pairs contained in this map. |
def foreach(f: (A) => Unit): Unit
Apply a function f to all elements of this
iterable object.
|
|
override
|
def get(key: A): Option[B]
Check if this map maps key to a value and return the
value if it exists.
|
override
|
def incl(mappings: Tuple2[A,B]*): Unit
incl can be used to add many mappings at the same time
to the map.
|
override
|
def isDefinedAt(key: A): Boolean
Does this map contain a mapping from the given key to a value? |
override
|
def isEmpty: Boolean
Is this an empty map? |
override
|
def keys: Iterator[A]
Creates an iterator for all keys. |
override
|
def map(f: (A,B) => B): Unit
This function transforms all the values of mappings contained in this map with function f .
|
override
|
def size: Int
Compute the number of key-to-value mappings. |
override
|
def toList: List[Tuple2[A,B]]
Returns the mappings of this map as a list. |
override
|
def toString(): String
Returns a string representation of this map which shows all the mappings. |
override
|
def update(key: A, value: B): Unit
This method allows one to add a new mapping from key
to value to the map.
|
override
|
def values: Iterator[B]
Creates an iterator for a contained values. |
Methods inherited from java/lang/Object-class |
eq, finalize, getClass, ne, notify, notifyAll, synchronized, wait, wait, wait |
Methods inherited from scala/Any-class |
!=, ==, asInstanceOf, isInstanceOf, match |
Methods inherited from scala/Iterable-class |
/:, :\, concat, elements, exists, find, foldLeft, foldRight, forall, foreach, sameElements |
Methods inherited from scala/ScalaObject-class |
getScalaType |
Methods inherited from scala/collection/Map-class |
equals, exists, forall |
Methods inherited from scala/collection/mutable/Map-class |
+=, MapTo, hashCode, mappingToString |
Method Detail |
override def size: Int
override def get(key: A): Option[B]
key
to a value and return the
value if it exists.
key
-
the key of the mapping of interest
override def isEmpty: Boolean
override def apply(key: A): B
key
-
the key
override def contains(key: A): Boolean
key
-
the key
override def isDefinedAt(key: A): Boolean
key
-
the key
override def keys: Iterator[A]
override def values: Iterator[B]
override def foreach(f: (A,B) => Unit): Unit
f
-
the function to execute.
def foreach(f: (A) => Unit): Unit
f
to all elements of this
iterable object.
f
-
a function that is applied to every element.
override def toList: List[Tuple2[A,B]]
override 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.
key
-
value
-
override def ++=(map: Iterable[Tuple2[A,B]]): Unit
map
to the map.
map
-
override def ++=(it: Iterator[Tuple2[A,B]]): Unit
map
to the map.
it
-
override 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.
mappings
-
override def -=(key: A): Unit
key
.
If the map does not contain a mapping for the given key, the
method does nothing.
override def --=(keys: Iterable[A]): Unit
keys
object.
keys
-
override def --=(it: Iterator[A]): Unit
keys
object.
it
-
override def excl(keys: A*): Unit
keys
-
override def clear: Unit
override def map(f: (A,B) => B): Unit
f
.
f
-
override def filter(p: (A,B) => Boolean): Unit
p
returns false
.
p
-
override def toString(): String
override def <<(cmd: Message[Tuple2[A,B]]): Unit
cmd
-
the message to send.
override def clone(): Map[A,B]
|
Scala
1.4.0.3 |
|||