|
Scala 2
|
class
Node
extends
ListMap with
ScalaObjectConstructor Summary | |
def
this
( key : A , value : B )
|
Def Summary | |
override
|
def
-
( k : 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.
|
override
|
def
apply
( k : A )
: B
Retrieve the value which is associated with the given key. This method throws an exception if there is no mapping from the given key to a value. |
override
|
def
get
( k : A )
: Option
Check if this map maps key to a value and return the
value if it exists.
|
override
|
def
hashCode
: scala.Int
|
override
|
def
isEmpty
: scala.Boolean
Is this an empty map? |
override
|
def
size
: scala.Int
Returns the number of mappings in this map. |
override
|
def
toList
: List
This return a list of key-value pairs. |
override
|
def
update
( k : A , v : 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
( key : A , value : B )
Def Detail |
def
-
( k : A ) : ListMap
key
.
If the map does not contain a mapping for the given key, the
method returns the same map.def
apply
( k : A ) : B
def
get
( k : A ) : Option
key
to a value and return the
value if it exists.def
hashCode
: scala.Int
def
isEmpty
: scala.Boolean
def
size
: scala.Int
def
toList
: List
def
update
( k : A , v : B ) : ListMap
key
to value
. If the map contains already a
mapping for key
, it will be overridden by this
function.