scala.collection.mutable

trait MutableList

[source: scala/collection/mutable/MutableList.scala]

trait MutableList[A]
extends Seq[A]
This class is used internally to represent mutable lists. It is the basis for the implementation of the classes Buffer, Stack, and Queue.
Author
Matthias Zenger
Version
1.0, 08/07/2003
Direct Known Subclasses:
Queue, Stack

Value Summary
protected var first : LinkedList[A]
protected var last : LinkedList[A]
protected var len : Int
Method Summary
protected def appendElem (elem : A) : Unit
def apply (n : Int) : A
Returns the nth element of this list. This method yields an error if the element does not exist.
def elements : Iterator[A]
Returns an iterator over all elements of this list.
def get (n : Int) : Option[A]
Returns the nth element of this list or None if this element does not exist.
def length : Int
Returns the length of this list.
protected def prependElem (elem : A) : Unit
protected def reset : Unit
protected override def stringPrefix : String
Defines the prefix of this object's toString representation.
override def toList : List[A]
Returns an instance of scala.List containing the same sequence of elements.
Methods inherited from Seq
size, isEmpty, concat, ++, isDefinedAt, lastIndexOf, map, flatMap, filter, take, drop, takeWhile, dropWhile, reverse, contains, slice, subseq, toArray
Methods inherited from Collection
toString
Methods inherited from Iterable
foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, mkString, mkString, addString, addString, copyToArray, projection, hasDefiniteSize
Methods inherited from PartialFunction
orElse, andThen
Methods inherited from Function1
compose
Methods inherited from AnyRef
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
protected var first : LinkedList[A]

protected var last : LinkedList[A]

protected var len : Int

Method Details
def length : Int
Returns the length of this list.
Overrides
Seq.length

def apply(n : Int) : A
Returns the nth element of this list. This method yields an error if the element does not exist.

def get(n : Int) : Option[A]
Returns the nth element of this list or None if this element does not exist.

protected def prependElem(elem : A) : Unit

protected def appendElem(elem : A) : Unit

protected def reset : Unit

def elements : Iterator[A]
Returns an iterator over all elements of this list.

override def toList : List[A]
Returns an instance of scala.List containing the same sequence of elements.

protected override def stringPrefix : String
Defines the prefix of this object's toString representation.