in scala.collection.immutable
class ListMap

@scala.serializable

class ListMap [A, +B]
extends java.lang.Object
with scala.collection.immutable.Map[A, B]
with scala.ScalaObject
This class implements immutable maps using a list-based data structure. Instances of ListMap represent empty maps; they can be either created by calling the constructor directly, or by applying the function ListMap.empty.
Author:
Matthias Zenger
Author:
Martin Oderskty
Version:
2.0, 01/01/2007
Direct Known Subclasses:
Node

Class Summary
protected class Node [B1 >: B]

Constructor Summary
def this

Def Summary
def - (key: A) : scala.collection.immutable.ListMap[A, B]
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 : scala.Iterator[scala.Tuple2[A, B]]
Returns an iterator over key-value pairs.
def empty [C] : scala.collection.immutable.ListMap[A, C]
Returns a new ListMap instance mapping keys of the same type to values of type C.
def get (key: A) : scala.Option[B]
Checks if this map maps key to a value and return the value if it exists.
protected def key : A

protected def next : scala.collection.immutable.ListMap[A, B]

def size : scala.Int
Returns the number of mappings in this map.
def update [B1 >: B] (key: A, value: B1) : scala.collection.immutable.ListMap[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.
protected def value : B

Def inherited from scala.collection.immutable.Map[A, B]
+ , +, +, ++, ++, -, -, --, --, empty, excl, excl, filter, incl, incl, mappingToString, transform, update, withDefault, withDefaultValue
Constructor Detail
def this

Def Detail
def - (key: A): scala.collection.immutable.ListMap[A, B]
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.
Parameters:
key - a map without a mapping for the given key.

def elements : scala.Iterator[scala.Tuple2[A, B]]
Returns an iterator over key-value pairs.

def empty [C]: scala.collection.immutable.ListMap[A, C]
Returns a new ListMap instance mapping keys of the same type to values of type C.

def get (key: A): scala.Option[B]
Checks if this map maps key to a value and return the value if it exists.
Parameters:
key - the key of the mapping of interest
Returns:
the value of the mapping, if it exists

protected def key : A

protected def next : scala.collection.immutable.ListMap[A, B]

def size : scala.Int
Returns the number of mappings in this map.
Returns:
number of mappings in this map.

def update [B1 >: B](key: A, value: B1): scala.collection.immutable.ListMap[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 - the key element of the updated entry.
Parameters:
value - the value element of the updated entry.

protected def value : B