Scala Library
|
|
trait
LinkedListTemplate[A, This <: Sequence[A] with
LinkedListTemplate[A, This] >: Null]
extends
SequenceTemplate[A, This]A
refers to the element type of the
list, type variable This
is used to model self types of
linked lists.
!!! todo: integrate with LinearSequence, need to drop null then.Value Summary | |
var
|
elem : A |
var
|
next : This |
Method Summary | |
def
|
append (that : This) : Unit |
override def
|
apply
(n : Int) : A
Returns the elements at position `idx`
|
override def
|
drop
(n : Int) : This
Returns this traversable without its
n first elements
If this traversable has less than n elements, the empty
traversable is returned. |
override def
|
foreach
[B](f : (A) => B) : Unit
Apply a function
f to all elements of this
traversable object. |
def
|
get (n : Int) : Option[A] |
override def
|
head
: A
The first element of this iterable.
|
def
|
insert (that : This) : Unit |
override def
|
isEmpty
: Boolean
Does this iterable contain no elements?
|
override def
|
iterator
: Iterator[A]
Creates a new iterator over all elements contained in this
iterable object.
|
override def
|
length
: Int
Returns the length of the sequence.
|
override def
|
tail
: This
An traversable consisting of all elements of this traversable
except the first one.
|
def
|
update (n : Int, x : A) : Unit |
Methods inherited from SequenceTemplate | |
lengthCompare, size, isDefinedAt, zip, zipAll, zipWithIndex, segmentLength, prefixLength, indexWhere, indexWhere, findIndexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, lastIndexWhere, reverse, reverseIterator, reversedElements, startsWith, startsWith, endsWith, indexOfSeq, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, contains, union, diff, intersect, removeDuplicates, patch, padTo, toSequence, indices, view, view, equals, toString, sortWith, findLastIndexOf, slice, equalsWith, containsSlice, projection |
Methods inherited from IterableTemplate | |
elements, foldRight, reduceRight, toIterable, takeRight, dropRight, sameElements, toStream, first, firstOption, toSeq |
Methods inherited from TraversableTemplate | |
newBuilder (abstract), thisCollection, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterMap, filterNot, remove, partition, groupBy, forall, exists, count, find, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, headOption, last, lastOption, init, take, slice, takeWhile, dropWhile, span, splitAt, copyToBuffer, copyToArray, copyToArray, toArray, toList, toSet, mkString, mkString, mkString, addString, addString, addString, stringPrefix |
Methods inherited from AnyRef | |
getClass, hashCode, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Value Details |
Method Details |
override
def
isEmpty : Boolean
override
def
length : Int
override
def
head : A
override
def
tail : This
n
first elements
If this traversable has less than n
elements, the empty
traversable is returned.n -
the number of elements to dropf
to all elements of this
traversable object.f -
A function that is applied for its side-effect to every element. The result (of arbitrary type U) of function `f` is discarded.
Scala Library
|
|