scala.collection.mutable

class MapBuilder

[source: scala/collection/mutable/MapBuilder.scala]

class MapBuilder[A, B, Coll <: Map[A, B] with MapLike[A, B, Coll]](empty : Coll)
extends Builder[(A, B), Coll]
The canonical builder for immutable maps, working with the map's `+` method to add new elements. Collections are built from their `empty` element using this + method.
Parameters
empty - The empty element of the collection.
Since
2.8
Value Summary
protected var elems : Coll
Method Summary
def += (x : (A, B)) : MapBuilder[A, B, Coll]
Adds a single element to the builder.
def clear : Unit
Clear the contents of this builder
def result : Coll
Returns collection resulting from this builder. The buffer's contents are undefined afterwards.
Methods inherited from Builder
sizeHint, mapResult
Methods inherited from Growable
+=, ++=, ++=
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
protected var elems : Coll

Method Details
def +=(x : (A, B)) : MapBuilder[A, B, Coll]
Adds a single element to the builder.
Parameters
elem - The element to be added
Overrides
Builder.+=

def clear : Unit
Clear the contents of this builder
Overrides
Builder.clear

def result : Coll
Returns collection resulting from this builder. The buffer's contents are undefined afterwards.
Overrides
Builder.result