Scala Library
|
|
scala/collection/jcl/BufferWrapper.scala
]
trait
BufferWrapper[A]
extends
Buffer[A] with
CollectionWrapper[A]Method Summary | |
override def
|
add (a : A) : Boolean |
override def
|
add
(idx : Int, a : A) : Unit
Inserts "a" into this buffer just before the element at index "idx."
|
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]
The default implementation of a map over mutable iterable collections.
|
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."
|
abstract def
|
underlying
: java.util.List[A]
Override to specify the collection being accessed through this wrapper.
* Collection operations are then routed through the wrapped Java collection.
|
Methods inherited from CollectionWrapper | |
has, size, hasAll, addAll, toString, hashCode, equals |
Methods inherited from IterableWrapper | |
remove, removeAll, retainAll, isEmpty, clear |
Methods inherited from Buffer | |
projection, firstKey, lastKey, compare, remove, replace, update, transform, +, -= |
Methods inherited from Collection | |
++, += |
Methods inherited from Ranged | |
from, until, range |
Methods inherited from MutableIterable | |
--, -, retainOnly, size0 |
Methods inherited from Mutable | |
readOnly, drop, take, slice, reverse |
Methods inherited from RandomAccessSeq | |
partition, patch, ++, toStream, safeIs |
Methods inherited from Seq | |
lengthCompare, 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 Collection | |
stringPrefix |
Methods inherited from Iterable | |
foreach, forall, exists, find, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, mkString, mkString, mkString, addString, addString, addString, copyToArray, hasDefiniteSize |
Methods inherited from PartialFunction | |
orElse, andThen |
Methods inherited from Function1 | |
compose |
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 : java.util.ListIterator[A]) extends Wrapper[A] with BufferIterator[Int, A]
|
protected class
|
Range
(from : Option[Int], until : Option[Int]) extends Range with BufferWrapper[A]
|
Method Details |
abstract
def
underlying : java.util.List[A]
override
def
elements : BufferIterator[Int, A]
idx
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
|
|