scala.collection.jcl
trait BufferWrapper

[source: `scala/collection/jcl/BufferWrapper.scala`]

`` `trait` BufferWrapper[A]
  `extends` Buffer[A]`with` CollectionWrapper[A]

  Wraps Java lists.

Author
  Sean McDirmid

Direct Known Subclasses:
  ArrayList, BufferWrapper.Range, LinkedList

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] 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 : 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
has, size, hasAll, addAll, toString, hashCode, equals

Methods inherited from IterableWrapper
remove, removeAll, retainAll, isEmpty, clear

Methods inherited from Buffer
projection, firstKey, lastKey, compare, update, transform, +, -=

Methods inherited from Collection
++, +=

Methods inherited from Seq
concat, last, ++, 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 Ranged
from, until, range

Methods inherited from MutableIterable
--, -, retain, size0

Methods inherited from Collection
stringPrefix, equalWith

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

`abstract` `def` underlying : List

  Override to specify the collection being accessed through this wrapper. * Collection operations are then routed through the wrapped Java collection.

Overrides
  CollectionWrapper.underlying

`override` `def` elements : BufferIterator[Int, A]

  The default implementation of a map over mutable iterable collections.

Overrides
  Buffer.elements, CollectionWrapper.elements

`override` `def` remove(idx : Int) : A

  Removes the element at index "idx"

Overrides
  Buffer.remove

`override` `def` add(a : A) : Boolean

Returns
  s always true.

Overrides
  Buffer.add, CollectionWrapper.add

`override` `def` add(idx : Int, a : A) : Unit

  Inserts "a" into this buffer just before the element at index "idx."

Overrides
  Buffer.add

`override` `def` addAll(idx : Int, that : Iterable[A]) : Unit

  Inserts all elements of `that` into this buffer just before the element at index `idx`.

Parameters
  `idx -` ..
  `that -` ..

Overrides
  Buffer.addAll

`override` `def` indexOf(a : A) : Option[Int]

  Find the index of "a" in this sequence.

Returns
  s None if the "a" is not in this sequence.

`override` `def` apply(idx : Int) : A

`override` `def` set(idx : Int, a : A) : A

  Replaces the element at index "idx" with "a."

Returns
  s the element replaced.

Overrides
  Buffer.set

`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.

Parameters
  `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.

Overrides
  Buffer.rangeImpl

`override` `def` length : Int

  Returns the length of the sequence.

Returns
  the sequence length.