Scala Library
|
|
trait
BufferLike[A, +This <: BufferLike[A, This] with
Buffer[A]]
extends
Growable[A] with
Shrinkable[A] with
Scriptable[A] with
Addable[A, This] with
Subtractable[A, This] with
Cloneable[This] with
SeqLike[A, This]Method Summary | |
override def
|
+
(elem1 : A, elem2 : A, elems : A*) : This
Adds two or more elements to this collection and returns
the collection itself.
|
override def
|
+
(elem : A) : This
Adds a single element to this collection and returns
the collection itself.
|
override def
|
++
(iter : Traversable[A]) : This
Adds a number of elements provided by a traversable object and returns
either the collection itself.
|
override def
|
++
(iter : Iterator[A]) : This
Adds a number of elements provided by an iterator and returns
the collection itself.
|
final def
|
++: (iter : Traversable[A]) : This |
final def
|
++: (iter : Iterator[A]) : This |
def
|
++=
(src : Array[A], start : Int, len : Int) : Unit
Adds a number of elements in an array
|
def
|
++=:
(iter : Traversable[A]) : This
Prepends a number of elements provided by an iterable object
via its
iterator method. The identity of the
buffer is returned.(repr /: elems) (_ plus _) |
def
|
++=:
(iter : Iterator[A]) : This
Prepends a number of elements provided by an iterator
The identity of the buffer is returned.
|
final def
|
+: (elem : A) : This |
abstract def
|
+=
(elem : A) : This
Append a single element to this buffer.
|
abstract def
|
+=:
(elem : A) : This
Prepend a single element to this buffer and return
the identity of the buffer.
|
override def
|
-
(elem : A) : This
Removes a single element from this collection and returns
the collection itself.
|
override def
|
-
(elem1 : A, elem2 : A, elems : A*) : This
Removes two or more elements from this collection and returns
the collection itself.
|
override def
|
--
(iter : Iterator[A]) : This
Removes a number of elements provided by an iterator and returns
the collection itself.
|
override def
|
--
(iter : Traversable[A]) : This
Removes a number of elements provided by a Traversable object and returns
the collection itself.
|
def
|
-=
(x : A) : This
Removes a single element from this buffer, at its first occurrence.
If the buffer does not contain that element, it is unchanged.
|
def
|
<<
(cmd : Message[A]) : Unit
Send a message to this scriptable object.
|
def
|
append
(elems : A*) : Unit
Appends elements to this buffer.
|
def
|
appendAll
(iter : Traversable[A]) : Unit
Appends a number of elements provided by an iterable object
via its
iterator method. |
abstract def
|
apply
(n : Int) : A
Return element at index `n`
|
abstract def
|
clear
: Unit
Clears the buffer contents.
|
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 . |
abstract 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 . |
abstract def
|
length
: Int
Return number of elements in the buffer
|
def
|
prepend
(elems : A*) : Unit
Prepend given elements to this list.
|
def
|
prependAll
(iter : Iterator[A]) : Unit
Prepends a number of elements provided by an iterable object
via its
iterator method. The identity of the
buffer is returned. |
def
|
prependAll
(iter : 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
|
readOnly : Seq[A] |
def
|
remove
(n : Int, count : Int) : Unit
Removes a number of elements from a given index position.
|
abstract def
|
remove
(n : Int) : A
Removes the element on a given index position.
|
override def
|
stringPrefix
: java.lang.String
Defines the prefix of the string representation.
|
def
|
trimEnd
(n : Int) : Unit
Removes the last
n elements. |
def
|
trimStart
(n : Int) : Unit
Removes the first
n elements. |
abstract def
|
update
(n : Int, newelem : A) : Unit
Replace element at index
n with the new element
newelem . |
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, hashCode, equals, toString, findLastIndexOf, equalsWith, containsSlice, projection |
Methods inherited from IterableLike | |
iterator (abstract), 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 TraversableLike | |
newBuilder (abstract), 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 Cloneable | |
clone |
Methods inherited from Shrinkable | |
-=, --=, --= |
Methods inherited from Growable | |
+=, ++=, ++= |
Methods inherited from AnyRef | |
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
IndexOutofBoundsException -
if the index is not validn
with the new element
newelem
.n -
the index of the element to replace.newelem -
the new element.IndexOutofBoundsException -
if the index is not validabstract
def
length : Int
elem -
the element to append.abstract
def
clear : Unit
elem -
the element to prepend.final
def
+:(elem : A) : This
abstract
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.IndexOutofBoundsException -
if the index is not validn -
the index which refers to the element to delete.n -
the index which refers to the element to delete.count -
the number of elements to deleteIndexOutofBoundsException -
if the index is not validx -
the element to remove.
def
++=:(iter : Traversable[A]) : This
iterator
method. The identity of the
buffer is returned.(repr /: elems) (_ plus _)iter -
the iterable object.final
def
++:(iter : Traversable[A]) : This
iter -
the iteratorfinal
def
++:(iter : Iterator[A]) : This
elems -
the elements to append.
def
appendAll(iter : Traversable[A]) : Unit
iterator
method.iter -
the iterable object.elem -
the element to prepend.
def
prependAll(iter : Traversable[A]) : Unit
iterator
method. The identity of the
buffer is returned.iter -
the iterable object.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.n
elements.n -
the number of elements to remove from the beginning of this buffer.n
elements.n -
the number of elements to remove from the end of this buffer.cmd -
the message to send.override
def
stringPrefix : java.lang.String
def
++=(src : Array[A], start : Int, len : Int) : Unit
src -
the arraystart -
the first element to appendlen -
the number of elements to appendoverride
def
+(elem : A) : This
elem -
the element to add.override
def
+(elem1 : A, elem2 : A, elems : A*) : This
elem1 -
the first element to add.elem2 -
the second element to add.elems -
the remaining elements to add.override
def
++(iter : Traversable[A]) : This
iter -
the iterable object.override
def
++(iter : Iterator[A]) : This
iter -
the iteratoroverride
def
-(elem : A) : This
elem -
the element to remove.override
def
-(elem1 : A, elem2 : A, elems : A*) : This
elem1 -
the first element to remove.elem2 -
the second element to remove.elems -
the remaining elements to remove.override
def
--(iter : Traversable[A]) : This
iter -
the Traversable object.override
def
--(iter : Iterator[A]) : This
iter -
the iterator
Scala Library
|
|