|
Scala Library Documentation
|
|
scala/collection/jcl/BufferWrapper.scala]
trait
BufferWrapper[A]
extends Buffer[A] with CollectionWrapper[A]| Method Summary | |
override def
|
add
(idx : Int, a : A) : Unit
Inserts "a" into this buffer just before the element at index "idx."
|
override def
|
add (a : A) : Boolean |
override def
|
addAll
(idx : Int, that : Iterable[A]) : Unit
Inserts all elements of
that into this buffer just before
the element at index idx. |
override def
|
apply (idx : Int) : A |
override def
|
elements
: BufferIterator[Int, A]
Creates a new iterator over all elements contained in this
object.
|
override def
|
indexOf
(a : A) : Option[Int]
Find the index of "a" in this sequence.
|
override def
|
length
: Int
Returns the length of the sequence.
|
override def
|
rangeImpl
(from : Option[Int], until : Option[Int]) : Buffer[A]
Creates a ranged projection of this collection. Any mutations in the
ranged projection will update this collection and vice versa. Note: keys
are not garuanteed to be consistent between this collection and the projection.
This is the case for buffers where indexing is relative to the projection.
|
override def
|
remove
(idx : Int) : A
Removes the element at index "idx"
|
override def
|
set
(idx : Int, a : A) : A
Replaces the element at index "idx" with "a."
|
protected abstract def
|
underlying
: List
Override to specify the collection being accessed through this wrapper.
* Collection operations are then routed through the wrapped Java collection.
|
| Methods inherited from CollectionWrapper | |
| underlying0, has, hasAll, addAll, toString, hashCode, equals |
| Methods inherited from IterableWrapper | |
| remove, removeAll, retainAll, isEmpty, clear |
| Methods inherited from Buffer | |
| projection, first, last, compare, update, transform, +, -= |
| Methods inherited from Ranged | |
| from, until, range |
| Methods inherited from Collection | |
| ++, += |
| Methods inherited from Seq | |
| size, concat, ++, isDefinedAt, lastIndexOf, map, flatMap, filter, take, drop, takeWhile, dropWhile, reverse, contains, slice, subseq, toArray |
| Methods inherited from PartialFunction | |
| orElse, andThen |
| Methods inherited from Function1 | |
| compose |
| Methods inherited from MutableIterable | |
| --, -, retain, size0 |
| Methods inherited from Collection | |
| stringPrefix |
| Methods inherited from Iterable | |
| foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, mkString, mkString, addString, addString, copyToArray, hasDefiniteSize |
| Methods inherited from AnyRef | |
| getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Class Summary | |
class
|
IteratorWrapper
(underlying : ListIterator) extends IteratorWrapper with BufferIterator[Int, A]
|
protected class
|
Range
(from : Option[Int], until : Option[Int]) extends Range with BufferWrapper[A]
|
| Method Details |
protected abstract
def
underlying : List
override
def
elements : BufferIterator[Int, A]
that into this buffer just before
the element at index idx.idx - ..that - ..from - The lower-bound (inclusive) of the ranged projection. None if there is no lower bound.until - The upper-bound (exclusive) of the ranged projection. None if there is no upper bound.override
def
length : Int
|
Scala Library Documentation
|
|