|
Scala Library
|
|
abstract
class
SingleLinkedList[A, This <: SingleLinkedList[A, This] >: Null]
extends Seq[A]A refers to the element type of the
list, type variable This is used to model self types of
linked lists.| Value Summary | |
abstract var
|
elem : A |
abstract var
|
next : This |
| Method Summary | |
def
|
append (that : This) : Unit |
def
|
apply (n : Int) : A |
override def
|
elements
: Iterator[A]
Creates a new iterator over all elements contained in this
object.
|
def
|
get (n : Int) : Option[A] |
def
|
insert (that : This) : Unit |
def
|
length
: Int
Returns the length of the sequence.
|
override def
|
toList
: List[A]
Returns a list containing all of the elements in this iterable object.
|
| Methods inherited from Seq | |
| lengthCompare, size, isEmpty, concat, last, lastOption, first, firstOption, headOption, ++, isDefinedAt, lastIndexOf, findIndexOf, indexOf, map, flatMap, filter, take, drop, slice, slice, takeWhile, dropWhile, reverse, contains, subseq, toArray, toSeq, projection, equalsWith, startsWith, startsWith, endsWith, indexOf, containsSlice |
| Methods inherited from Collection | |
| toString, stringPrefix |
| Methods inherited from Iterable | |
| partition, foreach, forall, exists, find, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toStream, mkString, mkString, mkString, addString, addString, addString, copyToArray, 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 |
| Method Details |
def
length : Int
|
Scala Library
|
|