scala.collection.generic

trait Growable

[source: scala/collection/generic/Growable.scala]

trait Growable[-A]
extends AnyRef
This class represents collections that can be augmented using a `+=` operator and that can be cleared of all elements using the `clear` method.
Author
Martin Odersky
Owner
Martin Odersky
Version
2.8
Since
2.8
Direct Known Subclasses:
BufferLike, Builder, MapLike, PriorityQueue, SetLike

Method Summary
def ++= (iter : Iterator[A]) : Growable[A]
Adds a number of elements provided by an iterator to this collection.
def ++= (iter : Traversable[A]) : Growable[A]
Adds a number of elements provided by an iterable object to this collection.
abstract def += (elem : A) : Growable[A]
Adds a single element to this collection.
def += (elem1 : A, elem2 : A, elems : A*) : Growable[A]
Adds two or more elements to this collection.
abstract def clear : Unit
Clears the collection contents.
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
abstract def +=(elem : A) : Growable[A]
Adds a single element to this collection.
Parameters
elem - the element to add.

def +=(elem1 : A, elem2 : A, elems : A*) : Growable[A]
Adds two or more elements to this collection.
Parameters
elem1 - the first element to add.
elem2 - the second element to add.
elems - the remaining elements to add.

def ++=(iter : Iterator[A]) : Growable[A]
Adds a number of elements provided by an iterator to this collection.
Parameters
iter - the iterator.

def ++=(iter : Traversable[A]) : Growable[A]
Adds a number of elements provided by an iterable object to this collection.
Parameters
iter - the iterable object.

abstract def clear : Unit
Clears the collection contents.