Growable

scala.collection.mutable.Growable
See theGrowable companion object
trait Growable[-A] extends Clearable

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
trait Clearable
class Object
trait Matchable
class Any
Known subtypes
trait Buffer[A]
class AbstractBuffer[A]
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]
class ListBuffer[A]
class UnrolledBuffer[T]
trait IndexedBuffer[A]
trait Builder[A, To]
class Builder[K, V]
class GrowableBuilder[Elem, To]
trait MapOps[K, V, CC, C]
class TrieMap[K, V]
class AnyRefMap[K, V]
class CollisionProofHashMap[K, V]
class HashMap[K, V]
class LinkedHashMap[K, V]
class ListMap[K, V]
class LongMap[V]
trait Map[K, V]
trait Map[K, V]
class AbstractMap[K, V]
class WithDefault[K, V]
class WithDefault[K, V]
class OpenHashMap[Key, Value]
class TreeMap[K, V]
trait MultiMap[K, V]
trait SeqMap[K, V]
trait SortedMap[K, V]
trait SortedMapOps[K, V, CC, C]
class PriorityQueue[A]
trait ReusableBuilder[Elem, To]
class VectorBuilder[A]
class AnyRefMapBuilder[K, V]
class ArrayBuilder[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
class ImmutableBuilder[A, C]
class LongMapBuilder[V]
trait SetOps[A, CC, C]
class HashSet[A]
class LinkedHashSet[A]
trait Set[A]
class AbstractSet[A]
class BitSet
class TreeSet[A]
trait SortedSet[A]
trait SortedSetOps[A, CC, C]
class Accumulator[A, CC, C]
class AnyAccumulator[A]
Show all

Members list

Value members

Abstract methods

def addOne(elem: A): this.type

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
Growable.scala

Concrete methods

final def ++=(xs: IterableOnce[A]): this.type

Alias for addAll

Alias for addAll

Attributes

Source
Growable.scala
final def +=(elem: A): this.type

Alias for addOne

Alias for addOne

Attributes

Source
Growable.scala
def addAll(xs: IterableOnce[A]): this.type

Adds all elements produced by an IterableOnce to this growable collection.

Adds all elements produced by an IterableOnce to this growable collection.

Value parameters

xs

the IterableOnce producing the elements to add.

Attributes

Returns

the growable collection itself.

Source
Growable.scala
def knownSize: Int

Attributes

Returns

The number of elements in the collection under construction, if it can be cheaply computed, -1 otherwise. The default implementation always returns -1.

Source
Growable.scala

Deprecated methods

final def +=(elem1: A, elem2: A, elems: A*): this.type

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
true
Source
Growable.scala

Inherited and Abstract methods

def clear(): Unit

Clears the collection's contents.

Clears the collection's contents. After this operation, the collection is empty.

Attributes

Inherited from:
Clearable
Source
Growable.scala