scala.collection

trait LinearSequence

[source: scala/collection/LinearSequence.scala]

trait LinearSequence[+A]
extends Sequence[A] with TraversableClass[A, LinearSequence] with LinearSequenceTemplate[A, LinearSequence[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 Sequence but overrides several methods with optimized implementations.

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

Method Summary
override def companion : Companion[LinearSequence]
The factory companion object that builds instances of class CC
Methods inherited from LinearSequenceTemplate
length, apply, iterator, foreach, forall, exists, count, find, foldLeft, foldRight, reduceLeft, reduceRight, last, take, drop, dropRight, span, sameElements, lengthCompare, isDefinedAt, segmentLength, indexWhere, lastIndexWhere, equals
Methods inherited from SequenceTemplate
size, zip, zipAll, zipWithIndex, prefixLength, indexWhere, findIndexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, reverse, reverseIterator, reversedElements, startsWith, startsWith, endsWith, indexOfSeq, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, contains, union, diff, intersect, removeDuplicates, patch, padTo, toSequence, indices, view, view, toString, sortWith, findLastIndexOf, slice, equalsWith, containsSlice, projection
Methods inherited from IterableTemplate
elements, isEmpty, toIterable, head, takeRight, toStream, first, firstOption, toSeq
Methods inherited from TraversableClass
newBuilder, genericBuilder, unzip, flatten, transpose
Methods inherited from TraversableTemplate
thisCollection, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterMap, filterNot, remove, partition, groupBy, /:, :\, reduceLeftOption, reduceRightOption, headOption, tail, lastOption, init, slice, takeWhile, dropWhile, splitAt, copyToBuffer, copyToArray, copyToArray, toArray, toList, toSet, mkString, mkString, mkString, addString, addString, addString, stringPrefix
Methods inherited from PartialFunction
orElse, andThen
Methods inherited from Function1
compose
Methods inherited from AnyRef
getClass, hashCode, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
override def companion : Companion[LinearSequence]
The factory companion object that builds instances of class CC
Overrides
Sequence.companion, TraversableClass.companion