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
-
object
- Source
-
Growable.scala
- Graph
-
- Supertypes
-
- Known subtypes
-
Members list
Add s a single element to this growable collection.
Add s a single element to this growable collection.
Value parameters
- elem
-
the element to add.
Attributes
- Returns
-
the growable collection itself
- Source
-
Growable.scala
Add s all elements produced by an IterableOnce to this growable collection.
Add s 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
-
Growable.scala
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
-
Growable.scala
Add s two or more elements to this growable collection.
Add s 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
-
Growable.scala
Clears the growable collection's contents. After this operation, the growable collection is empty.
Clears the growable collection's contents. After this operation, the growable collection is empty.
Attributes
- Inherited from:
-
Clearable
- Source
-
Growable.scala
Generated with
Copyright (c) 2002-2026, LAMP/EPFL
Copyright (c) 2002-2026, LAMP/EPFL