in scala.collection.immutable
trait Map

abstract trait Map [A, +B]
extends java.lang.Object
with scala.collection.Map[A, B]
with scala.ScalaObject
Direct Known Subclasses:
UnbalancedTreeMap, TreeMap, Map4, Map3, Map2, Map1, ListMap, HashMap, EmptyMap

Class Summary
class MapTo

Def Summary
def + (key: A) : Map.this.MapTo

This method defines syntactic sugar for adding a mapping. It is typically used in the following way:

      map + key -> value
    

def + [B1 >: B] (kv1: scala.Tuple2[A, B1], kv2: scala.Tuple2[A, B1], kvs: {A, B1}*) : scala.collection.immutable.Map[A, B1]
Add two or more key/value pairs to this map.
def + [B1 >: B] (kv: scala.Tuple2[A, B1]) : scala.collection.immutable.Map[A, B1]
Add a key/value pair to this map.
def ++ [B1 >: B] (kvs: scala.Iterable[scala.Tuple2[A, B1]]) : scala.collection.immutable.Map[A, B1]
Add a sequence of key/value pairs to this map.
def ++ [B1 >: B] (kvs: scala.Iterator[scala.Tuple2[A, B1]]) : scala.collection.immutable.Map[A, B1]
Add a sequence of key/value pairs to this map.
def - (key1: A, key2: A, keys: A*) : scala.collection.immutable.Map[A, B]
Remove two or more keys from this map
abstract def - (key: A) : scala.collection.immutable.Map[A, B]
Remove a key from this map
def -- (keys: scala.Iterable[A]) : scala.collection.immutable.Map[A, B]
Remove a sequence of keys from this map
def -- (keys: scala.Iterator[A]) : scala.collection.immutable.Map[A, B]
Remove a sequence of keys from this map
abstract def empty [C] : scala.collection.immutable.Map[A, C]
This method returns a new map instance of the same class mapping keys of the same type to values of type C.
def excl (keys: A*) : scala.collection.immutable.Map[A, B]
This method will return a map where all the mappings for the given sequence of keys are removed from the map.
def excl (keys: scala.Iterable[A]) : scala.collection.immutable.Map[A, B]
This method removes all the mappings for keys provided by an iterator over the elements of the keys object.
override def filter (p: (scala.Tuple2[A, B]) => scala.Boolean) : scala.collection.immutable.Map[A, B]
This method removes all the mappings for which the predicate p returns false.
def incl [B1 >: B] (map: scala.Iterable[scala.Tuple2[A, B1]]) : scala.collection.immutable.Map[A, B1]
incl can be used to add many mappings at the same time to the map. The method assumes that each mapping is represented by an Iterator over Pair objects who's first component denotes the key, and who's second component refers to the value.
def incl [B1 >: B] (mappings: {A, B1}*) : scala.collection.immutable.Map[A, B1]
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 mappingToString [B1 >: B] (p: scala.Tuple2[A, B1]) : java.lang.String
This method controls how a mapping is represented in the string representation provided by method toString.
def transform [C] (f: (A, B) => C) : scala.collection.immutable.Map[A, C]
This function transforms all the values of mappings contained in this map with function f.
abstract def update [B1 >: B] (key: A, value: B1) : scala.collection.immutable.Map[A, B1]
This method allows one to create a new map with an additional mapping from key to value. If the map contains already a mapping for key, it will be overridden by this function.
def withDefault [B1 >: B] (d: (A) => B1) : scala.collection.immutable.Map[A, B1]
The same map with a given default function
def withDefaultValue [B1 >: B] (d: B1) : scala.collection.immutable.Map[A, B1]
The same map with a given default value
Def inherited from scala.collection.Map[A, B]
apply , contains, default, equals, get, hashCode, isDefinedAt, isEmpty, keySet, keys, size, toString, values
Def Detail
[scala.deprecated]

def + (key: A): Map.this.MapTo

This method defines syntactic sugar for adding a mapping. It is typically used in the following way:

      map + key -> value
    
Deprecated:
use +({A, B}) instead

def + [B1 >: B](kv1: scala.Tuple2[A, B1], kv2: scala.Tuple2[A, B1], kvs: {A, B1}*): scala.collection.immutable.Map[A, B1]
Add two or more key/value pairs to this map.
Parameters:
kv1 - the first key/value pair.
Parameters:
kv2 - the second key/value pair.
Parameters:
kvs - the remaining key/value pairs.
Returns:
A new map with the new bindings added

def + [B1 >: B](kv: scala.Tuple2[A, B1]): scala.collection.immutable.Map[A, B1]
Add a key/value pair to this map.
Parameters:
kv - the key/value pair.
Returns:
A new map with the new binding added to this map

def ++ [B1 >: B](kvs: scala.Iterable[scala.Tuple2[A, B1]]): scala.collection.immutable.Map[A, B1]
Add a sequence of key/value pairs to this map.
Parameters:
kvs - the iterable object containing all key/value pairs.
Returns:
A new map with the new bindings added

def ++ [B1 >: B](kvs: scala.Iterator[scala.Tuple2[A, B1]]): scala.collection.immutable.Map[A, B1]
Add a sequence of key/value pairs to this map.
Parameters:
kvs - the iterator containing all key/value pairs.
Returns:
A new map with the new bindings added

def - (key1: A, key2: A, keys: A*): scala.collection.immutable.Map[A, B]
Remove two or more keys from this map
Parameters:
key1 - the first key to be removed
Parameters:
key2 - the second key to be removed
Parameters:
keys - the remaining keys to be removed
Returns:
A map without bindings for keys If the map is mutable, the bindings are removed in place and the map itself is returned. If the map is immutable, a new map with the bindings removed is returned.

abstract def - (key: A): scala.collection.immutable.Map[A, B]
Remove a key from this map
Parameters:
key - the key to be removed
Returns:
If the map does not contain a binding for key it is returned unchanged. Otherwise, return a new map without a binding for key

def -- (keys: scala.Iterable[A]): scala.collection.immutable.Map[A, B]
Remove a sequence of keys from this map
Parameters:
keys - the keys to be removed
Returns:
A map without bindings for the given keys. If the map is mutable, the bindings are removed in place and the map itself is returned. If the map is immutable, a new map with the bindings removed is returned.

def -- (keys: scala.Iterator[A]): scala.collection.immutable.Map[A, B]
Remove a sequence of keys from this map
Parameters:
keys - the keys to be removed
Returns:
A map without bindings for the given keys. If the map is mutable, the bindings are removed in place and the map itself is returned. If the map is immutable, a new map with the bindings removed is returned.

abstract def empty [C]: scala.collection.immutable.Map[A, C]
This method returns a new map instance of the same class mapping keys of the same type to values of type C.

[scala.deprecated]

def excl (keys: A*): scala.collection.immutable.Map[A, B]
This method will return a map where all the mappings for the given sequence of keys are removed from the map.
Parameters:
keys - ...
Returns:
the updated map
Deprecated:
use - instead

[scala.deprecated]

def excl (keys: scala.Iterable[A]): scala.collection.immutable.Map[A, B]
This method removes all the mappings for keys provided by an iterator over the elements of the keys object.
Parameters:
keys - ...
Returns:
the updated map
Deprecated:
use -- instead

override def filter (p: (scala.Tuple2[A, B]) => scala.Boolean): scala.collection.immutable.Map[A, B]
This method removes all the mappings for which the predicate p returns false.
Parameters:
p - A prediacte over key-value pairs
Returns:
the updated map

[scala.deprecated]

def incl [B1 >: B](map: scala.Iterable[scala.Tuple2[A, B1]]): scala.collection.immutable.Map[A, B1]
incl can be used to add many mappings at the same time to the map. The method assumes that each mapping is represented by an Iterator over Pair objects who's first component denotes the key, and who's second component refers to the value.
Deprecated:
use ++ instead

[scala.deprecated]

def incl [B1 >: B](mappings: {A, B1}*): scala.collection.immutable.Map[A, B1]
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 - ...
Returns:
...
Deprecated:
use + instead

[scala.deprecated]

def mappingToString [B1 >: B](p: scala.Tuple2[A, B1]): java.lang.String
This method controls how a mapping is represented in the string representation provided by method toString.
Parameters:
p - ...
Returns:
the string representation of a map entry

def transform [C](f: (A, B) => C): scala.collection.immutable.Map[A, C]
This function transforms all the values of mappings contained in this map with function f.
Parameters:
f - A function over keys and values
Returns:
the updated map

abstract def update [B1 >: B](key: A, value: B1): scala.collection.immutable.Map[A, B1]
This method allows one to create a new map with an additional mapping from key to value. If the map contains already a mapping for key, it will be overridden by this function.
Parameters:
key - ...
Parameters:
value - ...
Returns:
the created map
Deprecated:
use +({A, B}) instead

def withDefault [B1 >: B](d: (A) => B1): scala.collection.immutable.Map[A, B1]
The same map with a given default function

def withDefaultValue [B1 >: B](d: B1): scala.collection.immutable.Map[A, B1]
The same map with a given default value