Growable (original) (raw)
scala.collection.mutable.Growable
See theGrowable companion object
This trait forms part of collections that can be augmented using a +=
operator and that can be cleared of all elements using a clear
method.
Attributes
Companion
Source
Graph
Supertypes
Known subtypes
trait MapOps[K, V, CC, C]
trait Map[K, V]
trait Map[K, V]
Show all
Members list
Adds a single element to this growable collection.
Adds a single element to this growable collection.
Value parameters
elem
the element to add.
Attributes
Returns
the growable collection itself
Source
Adds all elements produced by an IterableOnce to this growable collection.
Adds all elements produced by an IterableOnce to this growable collection.
Value parameters
elems
the IterableOnce producing the elements to add.
Attributes
Returns
the growable collection itself.
Source
The number of elements in the collection under construction, if it can be cheaply computed, -1 otherwise.
The number of elements in the collection under construction, if it can be cheaply computed, -1 otherwise.
Attributes
Returns
The number of elements. The default implementation always returns -1.
Source
Adds two or more elements to this growable collection.
Adds two or more elements to this growable collection.
Value parameters
elem1
the first element to add.
elem2
the second element to add.
elems
the remaining elements to add.
Attributes
Returns
the growable collection itself
Deprecated
[Since version 2.13.0]
Use `++=` aka `addAll` instead of varargs `+=`; infix operations with an operand of multiple args will be deprecated
Source
Clears the collection's contents.
Clears the collection's contents. After this operation, the collection is empty.
Attributes
Inherited from:
Source
In this article