scala.collection.mutable

class LinkedList

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

@serializable

class LinkedList[A](val elem : A, val next : LinkedList[A])
extends SingleLinkedList[A, LinkedList[A]]
This class implements single linked lists where both the head (elem) and the tail (next) are mutable.
Author
Matthias Zenger
Version
1.0, 08/07/2003
Method Summary
override def equals (obj : Any) : Boolean
Compares two lists structurally; i.e. checks if all elements contained in this list are also contained in the other list, and vice versa.
override def hashCode : Int
A hash method compatible with equals
protected override def stringPrefix : java.lang.String
Defines the prefix of this object's toString representation.
Methods inherited from SingleLinkedList
length, append, insert, apply, get, elements, toList
Methods inherited from Seq
lengthCompare, size, isEmpty, concat, last, lastOption, first, firstOption, headOption, ++, isDefinedAt, lastIndexOf, map, flatMap, filter, take, drop, slice, slice, takeWhile, dropWhile, reverse, contains, subseq, toArray, toSeq, projection, equalsWith, startsWith, endsWith, indexOf, containsSlice
Methods inherited from Collection
toString
Methods inherited from Iterable
partition, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toStream, mkString, mkString, mkString, 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
Method Details
override def equals(obj : Any) : Boolean
Compares two lists structurally; i.e. checks if all elements contained in this list are also contained in the other list, and vice versa.
Parameters
that - the other list
Returns
true iff both lists contain exactly the same mappings.

override def hashCode : Int
A hash method compatible with equals

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