Scala Library
|
|
scala/runtime/RichStringBuilder.scala
]
final
class
RichStringBuilder(val
self : StringBuilder)
extends
Mutable[Char] with
Proxy with
Buffer[Char]Method Summary | |
override def
|
++
(iter : Iterable[Char]) : RichStringBuilder
Appends a number of elements provided by an iterable object
via its
elements method. The identity of the
buffer is returned. |
override def
|
++
[B >: Char](that : Iterable[B]) : RandomAccessSeq[B]
Appends two iterable objects.
|
override def
|
++=
(iter : Iterable[Char]) : Unit
Appends a number of elements provided by an iterable object
via its
elements method. |
override def
|
+:
(c : Char) : RichStringBuilder
Prepend a single element to this buffer and return
the identity of the buffer.
|
override def
|
+=
(c : Char) : Unit
Append a single element to this buffer.
|
override def
|
apply (idx : Int) : Char |
override def
|
clear
: Unit
Clears the buffer contents.
|
def
|
ensureSize (size : Int) : Unit |
override def
|
insertAll
(idx : Int, iter : Iterable[Char]) : Unit
Inserts new elements at the index
n . Opposed to method
update , this method will not replace an element with a
one. Instead, it will insert a new element at index n . |
override def
|
length
: Int
Returns the length of the sequence.
|
override def
|
mkString
: java.lang.String
Converts a collection into a flat
String by each element's toString method. |
override def
|
remove
(idx : Int) : Char
Removes the element on a given index position.
|
override def
|
update
(idx : Int, c : Char) : Unit
Replace element at index
n with the new element
newelem . |
Methods inherited from Buffer | |
+, ++=, ++=, ++, ++:, -=, append, appendAll, prepend, prependAll, insert, trimStart, trimEnd, <<, clone, hashCode, stringPrefix |
Methods inherited from Proxy | |
equals, toString |
Methods inherited from Mutable | |
projection, readOnly, drop, take, slice, reverse |
Methods inherited from RandomAccessSeq | |
elements, partition, patch, toStream, safeIs |
Methods inherited from Seq | |
lengthCompare, size, isEmpty, concat, last, lastOption, first, firstOption, headOption, isDefinedAt, lastIndexOf, findIndexOf, indexOf, map, flatMap, filter, slice, takeWhile, dropWhile, contains, subseq, toArray, toSeq, equalsWith, startsWith, startsWith, endsWith, indexOf, containsSlice |
Methods inherited from Iterable | |
foreach, forall, exists, find, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, mkString, mkString, addString, addString, addString, copyToArray, hasDefiniteSize |
Methods inherited from PartialFunction | |
orElse, andThen |
Methods inherited from Function1 | |
compose |
Methods inherited from AnyRef | |
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
override
def
length : Int
override
def
mkString : java.lang.String
String
by each element's toString method.n
with the new element
newelem
.n -
the index of the element to replace.newelem -
the new element.elem -
the element to append.elements
method.iter -
the iterable object.override
def
++(iter : Iterable[Char]) : RichStringBuilder
elements
method. The identity of the
buffer is returned.iter -
the iterable object.override
def
++[B >: Char](that : Iterable[B]) : RandomAccessSeq[B]
n
. Opposed to method
update
, this method will not replace an element with a
one. Instead, it will insert a new element at index n
.n -
the index where a new element will be inserted.iter -
the iterable object providing all elements to insert.override
def
+:(c : Char) : RichStringBuilder
elem -
the element to append.n -
the index which refers to the element to delete.override
def
clear : Unit
Scala Library
|
|