in scala/collection/mutable
trait Map

trait Map[A,B]()
extends Object
with ScalaObject
with Map[A,B]
with Scriptable[Message[Tuple2[A,B]]]
Implementing classes or objects:
trait MultiMap[A,B]()
class ObservableMap[A,B,This<:ObservableMap[A,B,This]]()
trait SynchronizedMap[A,B]()
trait MapProxy[A,B]()
class ImmutableMapAdaptor[A,B](m: Map[A,B])
class JavaMapAdaptor[A,B](jmap: java.util.Map)
trait DefaultMapModel[A,B]()
class HashMap[A,B]()

This trait represents mutable maps. Concrete map implementations just have to provide functionality for the abstract methods in scala.collection.Map as well as for update, and remove.
Author:
Matthias Zenger
Version:
1.1, 09/05/2004

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, 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
apply, contains, equals, exists, forall, foreach, get, isDefinedAt, isEmpty, keys, size, toList, values

Class Summary
  class MapTo(key: A)

Method Detail

update

  abstract def update(key: A, value: B): 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.
Parameters:
key -
value -

+=

  def +=(key: A): MapTo
This method defines syntactic sugar for adding or modifying mappings. It is typically used in the following way:
  map += key -> value;
  

++=

  def ++=(map: Iterable[Tuple2[A,B]]): Unit
This method adds all the mappings provided by an iterator of parameter map to the map.
Parameters:
map -

++=

  def ++=(it: Iterator[Tuple2[A,B]]): Unit
This method adds all the mappings provided by an iterator of parameter map to the map.
Parameters:
it -

incl

  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.
Parameters:
mappings -

-=

  abstract def -=(key: A): Unit
This method removes a mapping from the given key. If the map does not contain a mapping for the given key, the method does nothing.

--=

  def --=(keys: Iterable[A]): Unit
This method removes all the mappings for keys provided by an iterator over the elements of the keys object.
Parameters:
keys -

--=

  def --=(it: Iterator[A]): Unit
This method removes all the mappings for keys provided by an iterator over the elements of the keys object.
Parameters:
it -

excl

  def excl(keys: A*): Unit
This method will remove all the mappings for the given sequence of keys from the map.
Parameters:
keys -

clear

  def clear: Unit
Removes all mappings from the map. After this operation is completed, the map is empty.

map

  def map(f: (A,B) => B): Unit
This function transforms all the values of mappings contained in this map with function f.
Parameters:
f -

filter

  def filter(p: (A,B) => Boolean): Unit
This method removes all the mappings for which the predicate p returns false.
Parameters:
p -

<<

  def <<(cmd: Message[Tuple2[A,B]]): Unit
Send a message to this scriptable object.
Parameters:
cmd - the message to send.

clone

  override def clone(): Map[A,B]
Return a clone of this map.
Returns:
an map with the same elements.

hashCode

  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.
Returns:
never.

toString

  override def toString(): String
Returns a string representation of this map which shows all the mappings.

mappingToString

  def mappingToString(p: Tuple2[A,B]): String
This method controls how a mapping is represented in the string representation provided by method toString.
Parameters:
p -