in scala/collection/mutable
class MutableList
-
abstract class MutableList[A]()
- extends Seq[A]
- with ScalaObject
- with PartialFunction[Int,A]
-
Implementing classes or objects:
-
class ListBuffer[A]()
-
class Queue[A]()
-
class Stack[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
Methods inherited from java/lang/Object-class
|
clone, eq, equals, finalize, getClass, hashCode, ne, notify, notifyAll, synchronized, wait, wait, wait |
first
protected var first: LinkedList[A]
last
protected var last: LinkedList[A]
len
protected var len: Int
length
def length: Int
-
Returns the length of this list.
apply
def apply(n: Int): A
-
Returns the
n
th element of this list. This method
yields an error if the element does not exist.
get
def get(n: Int): Option[A]
-
Returns the
n
th element of this list or None
if this element does not exist.
prependElem
protected def prependElem(elem: A): Unit
appendElem
protected def appendElem(elem: A): Unit
reset
protected def reset: Unit
elements
def elements: Iterator[A]
-
Returns an iterator over all elements of this list.
toList
override def toList: List[A]
-
Returns an instance of
scala.List
containing the same
sequence of elements.
stringPrefix
protected override def stringPrefix: String
-
Defines the prefix of the string representation.