Scala Library
|
|
scala/collection/generic/Builder.scala
]
trait
Builder[-Elem, +To]
extends
Growable[Elem]Method Summary | |
abstract def
|
+=
(elem : Elem) : Builder[Elem, To]
Adds a single element to the builder.
|
abstract def
|
clear
: Unit
Clear the contents of this builder
|
def
|
mapResult
[NewTo](f : (To) => NewTo) : Builder[Elem, NewTo]
Create a new builder which is the same as the current builder except
that a given function is applied to the current builder's result.
|
abstract def
|
result
: To
Returns collection resulting from this builder. The buffer's contents
are undefined afterwards.
|
def
|
sizeHint
(size : Int) : Unit
Give a hint how many elements are expected to be added
when the next `result` is called.
|
Methods inherited from Growable | |
+=, ++=, ++= |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
elem -
The element to be addedabstract
def
clear : Unit
abstract
def
result : To
f -
the function to apply to the builder's result
Scala Library
|
|