c

strawman.collection.mutable

ImmutableBuilder

abstract class ImmutableBuilder[-A, C] extends ReusableBuilder[A, C]

Reusable builder for immutable collections

Linear Supertypes
ReusableBuilder[A, C], Builder[A, C], Growable[A], Clearable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ImmutableBuilder
  2. ReusableBuilder
  3. Builder
  4. Growable
  5. Clearable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ImmutableBuilder(empty: C)

Abstract Value Members

  1. abstract def addOne(elem: A): ImmutableBuilder.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

    Definition Classes
    Growable

Concrete 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[A]): ImmutableBuilder.this.type

    Alias for addAll

    Alias for addAll

    Definition Classes
    Growable
    Annotations
    @inline()
  4. final def +=(elem1: A, elem2: A, elems: A*): ImmutableBuilder.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

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

    Alias for addOne

    Alias for addOne

    Definition Classes
    Growable
    Annotations
    @inline()
  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. def addAll(xs: IterableOnce[A]): ImmutableBuilder.this.type

    Adds all elements produced by a TraversableOnce to this growable collection.

    Adds all elements produced by a TraversableOnce to this growable collection.

    xs

    the TraversableOnce producing the elements to add.

    returns

    the growable collection itself.

    Definition Classes
    Growable
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. 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.

    If executed immediately after a call to result, this allows a new instance of the same type of collection to be built.

    Definition Classes
    ImmutableBuilderReusableBuilderBuilderClearable
  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  11. var elems: C
    Attributes
    protected
  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
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def mapResult[NewTo](f: (C) ⇒ NewTo): Builder[A, 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
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. def result(): C

    Produces a collection from the added elements.

    Produces a collection from the added elements.

    After a call to result, the behavior of all other methods is undefined save for clear. If clear is called, then the builder is reset and may be used to build another instance.

    returns

    a collection containing the elements added to this builder.

    Definition Classes
    ImmutableBuilderReusableBuilderBuilder
  23. final def sizeHint(coll: collection.Iterable[_], delta: Int = 0): Unit

    Gives a hint that one expects the result of this builder to have the same size as the given collection, plus some delta.

    Gives a hint that one expects the result of this builder to have the same size as the given collection, plus some delta. This will provide a hint only if the collection has a known size 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.

    coll

    the collection which serves as a hint for the result's size.

    delta

    a correction to add to the coll.size to produce the size hint.

    Definition Classes
    Builder
  24. 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
  25. final def sizeHintBounded(size: Int, boundingColl: collection.Iterable[_]): Unit

    Gives a hint how many elements are expected to be added when the next result is called, together with an upper bound given by the size of some other collection.

    Gives a hint how many elements are expected to be added when the next result is called, together with an upper bound given by the size of some other collection. 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.

    boundingColl

    the bounding collection. If it is an IndexedSeqLike, then sizes larger than collection's size are reduced.

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

Inherited from ReusableBuilder[A, C]

Inherited from Builder[A, C]

Inherited from Growable[A]

Inherited from Clearable

Inherited from AnyRef

Inherited from Any

Ungrouped