scala.collection

trait LinearSeq

[source: scala/collection/LinearSeq.scala]

trait LinearSeq[+A]
extends Seq[A] with GenericTraversableTemplate[A, LinearSeq] with LinearSeqLike[A, LinearSeq[A]]

Class Linear[A] represents linear sequences of elements. For such sequences isEmpty, head and tail are guaranteed to be efficient constant time (or near so) operations.
It does not add any methods to Seq but overrides several methods with optimized implementations.

Author
Martin Odersky
Matthias Zenger
Version
1.0, 16/07/2003
Since
2.8
Direct Known Subclasses:
LinearSeq, LinearSeq

Method Summary
override def companion : GenericCompanion[LinearSeq]
The factory companion object that builds instances of class CC
Methods inherited from LinearSeqLike
thisCollection, toCollection, length, apply, iterator, foreach, forall, exists, count, find, foldLeft, foldRight, reduceLeft, reduceRight, last, take, drop, dropRight, slice, takeWhile, span, sameElements, lengthCompare, isDefinedAt, segmentLength, indexWhere, lastIndexWhere
Methods inherited from SeqLike
size, prefixLength, indexWhere, findIndexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, reverse, reverseMap, reverseIterator, reversedElements, startsWith, startsWith, endsWith, indexOfSeq, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, contains, union, diff, intersect, removeDuplicates, patch, updated, +:, :+, padTo, sortWith, sortWith, sortBy, toSeq, indices, view, view, hashCode, equals, toString, findLastIndexOf, equalsWith, containsSlice, projection
Methods inherited from IterableLike
elements, isEmpty, toIterable, head, takeRight, copyToArray, zip, zipAll, zipWithIndex, toStream, canEqual, first, firstOption
Methods inherited from GenericTraversableTemplate
newBuilder, genericBuilder, unzip, flatten, transpose
Methods inherited from TraversableLike
repr, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, /:, :\, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, lastOption, init, dropWhile, splitAt, copyToBuffer, copyToArray, toArray, toList, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, addString, stringPrefix, withFilter
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 companion : GenericCompanion[LinearSeq]
The factory companion object that builds instances of class CC
Overrides
Seq.companion, GenericTraversableTemplate.companion