c

strawman.collection.mutable

GrowableBuilder

class GrowableBuilder[Elem, To <: Growable[Elem]] extends Builder[Elem, To]

The canonical builder for collections that are growable, i.e. that support an efficient += method which adds an element to the collection.

GrowableBuilders can produce only a single instance of the collection they are growing.

Version

2.8

Since

2.8

Linear Supertypes
Builder[Elem, To], Growable[Elem], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GrowableBuilder
  2. Builder
  3. Growable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GrowableBuilder(elems: To)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ++=(xs: IterableOnce[Elem]): GrowableBuilder.this.type

    Alias for addAllInPlace

    Alias for addAllInPlace

    Definition Classes
    Growable
    Annotations
    @inline()
  4. final def +=(elem1: Elem, elem2: Elem, elems: Elem*): GrowableBuilder.this.type

    ${Add}s two or more elements to this $coll.

    ${Add}s two or more elements to this $coll.

    elem1

    the first element to $add.

    elem2

    the second element to $add.

    elems

    the remaining elements to $add.

    returns

    the $coll itself

    Definition Classes
    Growable
    Annotations
    @inline()
  5. final def +=(elem: Elem): GrowableBuilder.this.type

    Alias for add

    Alias for add

    Definition Classes
    Growable
    Annotations
    @inline()
  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. def add(elem: Elem): GrowableBuilder.this.type

    ${Add}s a single element to this growing builder.

    ${Add}s a single element to this growing builder.

    elem

    the element to $add.

    returns

    the growing builder itself

    Definition Classes
    GrowableBuilderGrowable
  8. def addAll(xs: IterableOnce[Elem]): GrowableBuilder.this.type

    ${Add}s all elements produced by a TraversableOnce to this $coll.

    ${Add}s all elements produced by a TraversableOnce to this $coll.

    xs

    the TraversableOnce producing the elements to $add.

    returns

    the $coll itself.

    Definition Classes
    Growable
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clear(): Unit

    Clears the contents of this builder.

    Clears the contents of this builder. After execution of this method the builder will contain no elements.

    Definition Classes
    GrowableBuilderBuilderGrowable
  11. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def mapResult[NewTo](f: (To) ⇒ NewTo): Builder[Elem, NewTo]

    A builder resulting from this builder my mapping the result using f.

    A builder resulting from this builder my mapping the result using f.

    Definition Classes
    Builder
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  22. def result(): To

    Result collection consisting of all elements appended so far.

    Result collection consisting of all elements appended so far.

    Definition Classes
    GrowableBuilderBuilder
  23. def sizeHint(size: Int): Unit

    Gives a hint how many elements are expected to be added when the next result is called.

    Gives a hint how many elements are expected to be added when the next result is called. Some builder classes will optimize their representation based on the hint. However, builder implementations are still required to work correctly even if the hint is wrong, i.e. a different number of elements is added.

    size

    the hint how many elements will be added.

    Definition Classes
    Builder
  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Builder[Elem, To]

Inherited from Growable[Elem]

Inherited from AnyRef

Inherited from Any

Ungrouped