Scala Library
|
|
trait
SynchronizedBuffer[A]
extends
Buffer[A]Buffer
methods of the class into which it is mixed in.Method Summary | |
override def
|
+
(elem : A) : Buffer
Append a single element to this buffer and return
the identity of the buffer.
|
override def
|
++
(iter : Traversable[A]) : Buffer
Appends a number of elements provided by an iterable object
via its
iterator method. The identity of the
buffer is returned. |
override def
|
++=
(iter : Traversable[A]) : SynchronizedBuffer[A]
Appends a number of elements provided by an iterable object
via its
iterator method. |
override def
|
++=:
(iter : Traversable[A]) : SynchronizedBuffer[A]
Prepends a number of elements provided by an iterable object
via its
iterator method. The identity of the
buffer is returned. |
def
|
+=
(elem : A) : SynchronizedBuffer[A]
Append a single element to this buffer.
|
def
|
+=:
(elem : A) : SynchronizedBuffer[A]
Prepend a single element to this buffer and return
the identity of the buffer.
|
override def
|
<<
(cmd : Message[A]) : Unit
Send a message to this scriptable object.
|
override def
|
append
(elems : A*) : Unit
Appends a sequence of elements to this buffer.
|
override def
|
appendAll
(iter : Traversable[A]) : Unit
Appends a number of elements provided by an iterable object
via its
iterator method. |
def
|
apply
(n : Int) : A
Return element at index `n`
|
def
|
clear
: Unit
Clears the buffer contents.
|
override def
|
clone
: Buffer
Return a clone of this buffer.
|
override def
|
hashCode
: Int
The hashCode method always yields an error, since it is not
safe to use buffers as keys in hash tables.
|
override def
|
insert
(n : Int, elems : A*) : 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 the new elements at index n . |
def
|
insertAll
(n : Int, iter : Traversable[A]) : 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 . |
def
|
iterator
: Iterator[A]
Creates a new iterator over all elements contained in this
iterable object.
|
def
|
length
: Int
Return number of elements in the buffer
|
override def
|
prepend
(elems : A*) : Unit
Prepend an element to this list.
|
override def
|
prependAll
(elems : Traversable[A]) : Unit
Prepends a number of elements provided by an iterable object
via its
iterator method. The identity of the
buffer is returned. |
def
|
remove
(n : Int) : A
Removes the element on a given index position.
|
def
|
update
(n : Int, newelem : A) : Unit
Replace element at index
n with the new element
newelem . |
Methods inherited from Buffer | |
companion |
Methods inherited from BufferLike | |
+:, remove, -=, ++:, ++=:, prependAll, trimStart, trimEnd, stringPrefix, ++=, +, ++, -, -, --, --, readOnly |
Methods inherited from Shrinkable | |
-=, --=, --= |
Methods inherited from Growable | |
+=, ++= |
Methods inherited from SeqLike | |
thisCollection, toCollection, lengthCompare, size, isDefinedAt, segmentLength, prefixLength, indexWhere, indexWhere, findIndexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, lastIndexWhere, reverse, reverseMap, reverseIterator, reversedElements, startsWith, startsWith, endsWith, indexOfSeq, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, contains, union, diff, intersect, removeDuplicates, patch, updated, +:, :+, padTo, sortWith, sortWith, sortBy, toSeq, indices, view, view, equals, toString, findLastIndexOf, equalsWith, containsSlice, projection |
Methods inherited from PartialFunction | |
orElse, andThen |
Methods inherited from Function1 | |
compose |
Methods inherited from IterableLike | |
elements, foreach, forall, exists, find, isEmpty, foldRight, reduceRight, toIterable, head, take, slice, takeWhile, takeRight, dropRight, copyToArray, zip, zipAll, zipWithIndex, sameElements, toStream, canEqual, first, firstOption |
Methods inherited from GenericTraversableTemplate | |
newBuilder, genericBuilder, unzip, flatten, transpose |
Methods inherited from TraversableLike | |
repr, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, count, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, last, lastOption, init, drop, dropWhile, span, splitAt, copyToBuffer, copyToArray, toArray, toList, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, addString, withFilter |
Methods inherited from AnyRef | |
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
def
length : Int
IndexOutofBoundsException -
if the index is not validelem -
the element to append.
def
+=(elem : A) : SynchronizedBuffer[A]
elem -
the element to append.override
def
++(iter : Traversable[A]) : Buffer
iterator
method. The identity of the
buffer is returned.iter -
the iterable object.override
def
++=(iter : Traversable[A]) : SynchronizedBuffer[A]
iterator
method.iter -
the iterable object.elems -
the elements to append.override
def
appendAll(iter : Traversable[A]) : Unit
iterator
method.iter -
the iterable object.
def
+=:(elem : A) : SynchronizedBuffer[A]
elem -
the element to append.override
def
++=:(iter : Traversable[A]) : SynchronizedBuffer[A]
iterator
method. The identity of the
buffer is returned.iter -
the iterable object.elem -
the element to prepend.override
def
prependAll(elems : Traversable[A]) : Unit
iterator
method. The identity of the
buffer is returned.iter -
the iterable object.n
. Opposed to method
update
, this method will not replace an element with a
one. Instead, it will insert the new elements at index n
.n -
the index where a new element will be inserted.elems -
the new elements to insert.
def
insertAll(n : Int, iter : Traversable[A]) : Unit
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.n
with the new element
newelem
.n -
the index of the element to replace.newelem -
the new element.n -
the index which refers to the element to delete.
def
clear : Unit
cmd -
the message to send.override
def
clone : Buffer
ArrayBuffer
with the same elements.override
def
hashCode : Int
Scala Library
|
|