|
Scala 2
|
class
Map
[ A , B ]
extends
java.lang.Object with
Map with
Scriptable with
ScalaObjectscala.collection.Map
as well as for update
,
and remove
.Class Summary | |
class
MapTo
|
Def Summary | |
def
++=
( it : Iterator )
: scala.Unit
This method adds all the mappings provided by an iterator of parameter map to the map.
|
|
def
++=
( map : Iterable )
: scala.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. It is typically used in the following way: map += key -> value; |
|
def
--=
( it : Iterator )
: scala.Unit
This method removes all the mappings for keys provided by an iterator over the elements of the keys object.
|
|
def
--=
( keys : Iterable )
: scala.Unit
This method removes all the mappings for keys provided by an iterator over the elements of the keys object.
|
|
def
-=
( key : A )
: scala.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
<<
( cmd : Message )
: 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
: Map
Return a clone of this map. |
def
excl
( keys : scala.<repeated> )
: scala.Unit
This method will remove all the mappings for the given sequence of keys from the map. |
|
def
filter
( p : Function2 )
: scala.Unit
This method removes all the mappings for which the predicate p returns false .
|
|
override
|
def
hashCode
: scala.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 : scala.<repeated> )
: 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
map
( f : Function2 )
: scala.Unit
This function transforms all the values of mappings contained in this map with function f .
|
|
def
mappingToString
( p : Tuple2 )
: java.lang.String
This method controls how a mapping is represented in the string representation provided by method toString .
|
|
override
|
def
toString
: java.lang.String
Returns a string representation of this map which shows all the mappings. |
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 Detail |
def
++=
( it : Iterator ) : scala.Unit
map
to the map.def
++=
( map : Iterable ) : scala.Unit
map
to the map.def
+=
( key : A ) : MapTo
map += key -> value;
def
--=
( it : Iterator ) : scala.Unit
keys
object.def
--=
( keys : Iterable ) : scala.Unit
keys
object.def
-=
( key : A ) : scala.Unit
key
.
If the map does not contain a mapping for the given key, the
method does nothing.def
<<
( cmd : Message ) : scala.Unit
def
clear
: scala.Unit
def
clone
: Map
def
excl
( keys : scala.<repeated> ) : scala.Unit
def
filter
( p : Function2 ) : scala.Unit
p
returns false
.def
hashCode
: scala.Int
def
incl
( mappings : scala.<repeated> ) : 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
map
( f : Function2 ) : scala.Unit
f
.def
mappingToString
( p : Tuple2 ) : java.lang.String
toString
.def
toString
: java.lang.String
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.