class StringBuilder extends Builder[Char, String]
- Alphabetic
- By Inheritance
- StringBuilder
- Builder
- Growable
- Clearable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new StringBuilder()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
++=(s: String): StringBuilder.this.type
Alias for
addAllInPlace -
final
def
++=(xs: IterableOnce[Char]): StringBuilder.this.type
Alias for
addAllInPlaceAlias for
addAllInPlace- Definition Classes
- Growable
- Annotations
- @inline()
-
final
def
+=(elem1: Char, elem2: Char, elems: Char*): StringBuilder.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()
-
final
def
+=(elem: Char): StringBuilder.this.type
Alias for
addAlias for
add- Definition Classes
- Growable
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
add(x: Char): StringBuilder.this.type
Adds a single element to this growable collection.
Adds a single element to this growable collection.
- returns
the growable collection itself
- Definition Classes
- StringBuilder → Growable
-
def
addAll(xs: IterableOnce[Char]): StringBuilder.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
-
def
addAllInPlace(s: String): StringBuilder.this.type
Overloaded version of
addAllInPlacethat takes a string - def append(x: Char): StringBuilder
- def append(x: Double): StringBuilder
- def append(x: Float): StringBuilder
- def append(x: Long): StringBuilder
- def append(x: Int): StringBuilder
- def append(x: Short): StringBuilder
- def append(x: Byte): StringBuilder
-
def
append(x: Boolean): StringBuilder
Append the String representation of the given primitive type to this sequence.
Append the String representation of the given primitive type to this sequence. The argument is converted to a String with String.valueOf.
- x
a primitive value
- returns
This StringBuilder.
-
def
append(s: StringBuilder): StringBuilder
Appends the specified string builder to this sequence.
-
def
append(s: String): StringBuilder
Appends the given String to this sequence.
Appends the given String to this sequence.
- s
a String.
- returns
this StringBuilder.
-
def
append(x: Any): StringBuilder
Appends the string representation of the given argument, which is converted to a String with
String.valueOf.Appends the string representation of the given argument, which is converted to a String with
String.valueOf.- x
an
Anyobject.- returns
this StringBuilder.
-
def
appendAll(xs: Array[Char], offset: Int, len: Int): StringBuilder
Appends a portion of the given Array[Char] to this sequence.
Appends a portion of the given Array[Char] to this sequence.
- xs
the Array containing Chars to be appended.
- offset
the index of the first Char to append.
- len
the numbers of Chars to append.
- returns
this StringBuilder.
-
def
appendAll(xs: Array[Char]): StringBuilder
Appends all the Chars in the given Array[Char] to this sequence.
Appends all the Chars in the given Array[Char] to this sequence.
- xs
the characters to be appended.
- returns
a reference to this object.
- def appendAll(xs: String): StringBuilder
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
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
- StringBuilder → Builder → Clearable
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def length: Int
-
def
mapResult[NewTo](f: (String) ⇒ NewTo): Builder[Char, 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
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
result(): String
Result collection consisting of all elements appended so far.
Result collection consisting of all elements appended so far.
- Definition Classes
- StringBuilder → Builder
-
final
def
sizeHint(coll: collection.Iterable[_], delta: Int = 0): Unit
Gives a hint that one expects the
resultof this builder to have the same size as the given collection, plus some delta.Gives a hint that one expects the
resultof 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.sizeto produce the size hint.
- Definition Classes
- Builder
-
def
sizeHint(size: Int): Unit
Gives a hint how many elements are expected to be added when the next
resultis called.Gives a hint how many elements are expected to be added when the next
resultis 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
-
final
def
sizeHintBounded(size: Int, boundingColl: collection.Iterable[_]): Unit
Gives a hint how many elements are expected to be added when the next
resultis 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
resultis 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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- StringBuilder → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )