|
Scala 2
|
class
ListMap
[ A , B ]
extends
java.lang.Object with
Map with
ScalaObjectListMap
represent
empty maps; they can be either created by calling the constructor
directly, or by applying the function ListMap.Empty
.Constructor Summary | |
def
this
|
Class Summary | |
protected
|
class
Node
|
Def Summary | |
def
-
( key : A )
: ListMap
This creates a new mapping without the given key .
If the map does not contain a mapping for the given key, the
method returns the same map.
|
|
def
elements
: Iterator
This returns an iterator over key-value pairs. |
|
def
empty
[ C ]
: ListMap
This method returns a new ListMap instance mapping keys of the same type to values of type C .
|
|
override
|
def
equals
( obj : scala.Any )
: scala.Boolean
Compares two maps for equality. Two maps are equal iff they contain exactly the same key-value pairs. |
def
get
( key : A )
: Option
Check if this map maps key to a value and return the
value if it exists.
|
|
override
|
def
hashCode
: scala.Int
|
def
size
: scala.Int
Returns the number of mappings in this map. |
|
override
|
def
toList
: List
This return a list of key-value pairs. |
def
update
( key : A , value : B )
: ListMap
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.
|
Constructor Detail |
def
this
Def Detail |
def
-
( key : A ) : ListMap
key
.
If the map does not contain a mapping for the given key, the
method returns the same map.def
elements
: Iterator
def
empty
[ C ] : ListMap
C
.def
equals
( obj : scala.Any ) : scala.Boolean
def
get
( key : A ) : Option
key
to a value and return the
value if it exists.def
hashCode
: scala.Int
def
size
: scala.Int
def
toList
: List
def
update
( key : A , value : B ) : ListMap
key
to value
. If the map contains already a
mapping for key
, it will be overridden by this
function.