Packages

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.

Source
Growable.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Growable
  2. Clearable
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def addOne(elem: A): Growable.this.type

    Adds a single element to this growable collection.

    Adds a single element to this growable collection.

    elem

    the element to add.

    returns

    the growable collection itself

  2. abstract def clear(): Unit

    Clears the collection's contents.

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

    Definition Classes
    Clearable

Concrete Value Members

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

    Alias for addAll

    Alias for addAll

    Annotations
    @inline()
  2. final def +=(elem: A): Growable.this.type

    Alias for addOne

    Alias for addOne

    Annotations
    @inline()
  3. def addAll(xs: IterableOnce[A]): Growable.this.type

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

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

    xs

    the IterableOnce producing the elements to add.

    returns

    the growable collection itself.

  4. def knownSize: Int

    returns

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

Deprecated Value Members

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

    Adds two or more elements to this growable collection.

    Adds two or more elements to this growable collection.

    elem1

    the first element to add.

    elem2

    the second element to add.

    elems

    the remaining elements to add.

    returns

    the growable collection itself

    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use ++= (addAll) instead of varargs +=