scala.collection.immutable

class Vector

[source: scala/collection/immutable/Vector.scala]

@serializable

final class Vector[+A](startIndex : Int, endIndex : Int, focus : Int)
extends Seq[A] with GenericTraversableTemplate[A, Vector] with SeqLike[A, Vector[A]] with scala.collection.immutable.VectorPointer[A]
Value Summary
var dirty : Boolean
Values and Variables inherited from scala.collection.immutable.VectorPointer
scala.collection.immutable.VectorPointer.depth, scala.collection.immutable.VectorPointer.display0, scala.collection.immutable.VectorPointer.display1, scala.collection.immutable.VectorPointer.display2, scala.collection.immutable.VectorPointer.display3, scala.collection.immutable.VectorPointer.display4, scala.collection.immutable.VectorPointer.display5
Method Summary
override def +: [B >: A, That](elem : B)(implicit bf : CanBuildFrom[Vector[A], B, That]) : That
Returns a new sequence consisting of `elem` followed by the elements of this sequence.
override def :+ [B >: A, That](elem : B)(implicit bf : CanBuildFrom[Vector[A], B, That]) : That
Returns a new sequence consisting of the elements of this sequence followed by `elem`.
def appendBack [B >: A](value : B) : Vector[B]
def appendFront [B >: A](value : B) : Vector[B]
def apply (index : Int) : A
Returns the elements at position `idx`
override def companion : GenericCompanion[Vector]
The factory companion object that builds instances of class CC
def copyLeft (array : Array[AnyRef], right : Int) : Array[AnyRef]
def copyRight (array : Array[AnyRef], left : Int) : Array[AnyRef]
override def drop (n : Int) : Vector[A]
Returns this traversable without its n first elements If this traversable has less than n elements, the empty traversable is returned.
override def dropRight (n : Int) : Vector[A]
Returns the iterable wihtout its rightmost n elements.
def foreach0 [U](f : (A) => U) : Unit
override def iterator : VectorIterator[A]
Creates a new iterator over all elements contained in this iterable object.
def length : Int
Returns the length of the sequence.
override def lengthCompare (len : Int) : Int
Result of comparing length with operand len. returns x where x < 0 iff this.length < len x == 0 iff this.length == len x > 0 iff this.length > len. The method as implemented here does not call length directly; its running time is O(length min len) instead of O(length). The method should be overwritten if computing length is cheap.
def map0 [B, That](f : (A) => B)(implicit bf : CanBuildFrom[Vector[A], B, That]) : That
override def take (n : Int) : Vector[A]
Return an iterable consisting only of the first n elements of this iterable, or else the whole iterable, if it has less than n elements.
override def takeRight (n : Int) : Vector[A]
Returns the rightmost n elements from this iterable.
def updateAt [B >: A](index : Int, elem : B) : Vector[B]
override def updated [B >: A, That](index : Int, elem : B)(implicit bf : CanBuildFrom[Vector[A], B, That]) : That
Returns a copy of this sequence with the element at position `index` replaced by `elem`.
def zeroLeft (array : Array[AnyRef], index : Int) : Unit
def zeroRight (array : Array[AnyRef], index : Int) : Unit
Methods inherited from scala.collection.immutable.VectorPointer
scala.collection.immutable.VectorPointer.initFrom, scala.collection.immutable.VectorPointer.initFrom, scala.collection.immutable.VectorPointer.getElem, scala.collection.immutable.VectorPointer.gotoPos, scala.collection.immutable.VectorPointer.gotoNextBlockStart, scala.collection.immutable.VectorPointer.gotoNextBlockStartWritable, scala.collection.immutable.VectorPointer.copyOf, scala.collection.immutable.VectorPointer.nullSlotAndCopy, scala.collection.immutable.VectorPointer.stabilize, scala.collection.immutable.VectorPointer.gotoPosWritable0, scala.collection.immutable.VectorPointer.gotoPosWritable1, scala.collection.immutable.VectorPointer.copyRange, scala.collection.immutable.VectorPointer.gotoFreshPosWritable0, scala.collection.immutable.VectorPointer.gotoFreshPosWritable1, scala.collection.immutable.VectorPointer.debug
Methods inherited from SeqLike
thisCollection, toCollection, size, isDefinedAt, segmentLength, prefixLength, indexWhere, indexWhere, findIndexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, lastIndexWhere, reverse, reverseMap, reverseIterator, reversedElements, startsWith, startsWith, endsWith, indexOfSeq, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, contains, union, diff, intersect, removeDuplicates, patch, padTo, sortWith, sortWith, sortBy, toSeq, indices, view, view, hashCode, equals, toString, findLastIndexOf, equalsWith, containsSlice, projection
Methods inherited from PartialFunction
orElse, andThen
Methods inherited from Function1
compose
Methods inherited from IterableLike
elements, foreach, forall, exists, find, isEmpty, foldRight, reduceRight, toIterable, head, slice, takeWhile, copyToArray, zip, zipAll, zipWithIndex, sameElements, 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, count, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, last, lastOption, init, dropWhile, span, splitAt, copyToBuffer, copyToArray, toArray, toList, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, addString, stringPrefix, withFilter
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
var dirty : Boolean

Method Details
override def companion : GenericCompanion[Vector]
The factory companion object that builds instances of class CC
Overrides
Seq.companion, GenericTraversableTemplate.companion

def length : Int
Returns the length of the sequence.
Overrides
SeqLike.length

override def lengthCompare(len : Int) : Int
Result of comparing length with operand len. returns x where x < 0 iff this.length < len x == 0 iff this.length == len x > 0 iff this.length > len. The method as implemented here does not call length directly; its running time is O(length min len) instead of O(length). The method should be overwritten if computing length is cheap.
Overrides
SeqLike.lengthCompare

@inline

override def iterator : VectorIterator[A]
Creates a new iterator over all elements contained in this iterable object.
Returns
the new iterator

@inline

def foreach0[U](f : (A) => U) : Unit

@inline

def map0[B, That](f : (A) => B)(implicit bf : CanBuildFrom[Vector[A], B, That]) : That

def apply(index : Int) : A
Returns the elements at position `idx`
Overrides
SeqLike.apply

@inline

override def updated[B >: A, That](index : Int, elem : B)(implicit bf : CanBuildFrom[Vector[A], B, That]) : That
Returns a copy of this sequence with the element at position `index` replaced by `elem`.
Overrides
SeqLike.updated

@inline

override def +:[B >: A, That](elem : B)(implicit bf : CanBuildFrom[Vector[A], B, That]) : That
Returns a new sequence consisting of `elem` followed by the elements of this sequence.
Overrides
SeqLike.+:

@inline

override def :+[B >: A, That](elem : B)(implicit bf : CanBuildFrom[Vector[A], B, That]) : That
Returns a new sequence consisting of the elements of this sequence followed by `elem`.
Overrides
SeqLike.:+

override def take(n : Int) : Vector[A]
Return an iterable consisting only of the first n elements of this iterable, or else the whole iterable, if it has less than n elements.
Parameters
n - the number of elements to take
Notes
Might return different results for different runs, unless this iterable is ordered

override def drop(n : Int) : Vector[A]
Returns this traversable without its n first elements If this traversable has less than n elements, the empty traversable is returned.
Parameters
n - the number of elements to drop
Returns
the new traversable
Notes
Might return different results for different runs, unless this traversable is ordered

override def takeRight(n : Int) : Vector[A]
Returns the rightmost n elements from this iterable.
Parameters
n - the number of elements to take
Notes
Might return different results for different runs, unless this iterable is ordered

override def dropRight(n : Int) : Vector[A]
Returns the iterable wihtout its rightmost n elements.
Parameters
n - the number of elements to take
Notes
Might return different results for different runs, unless this iterable is ordered

def updateAt[B >: A](index : Int, elem : B) : Vector[B]

def appendFront[B >: A](value : B) : Vector[B]

def appendBack[B >: A](value : B) : Vector[B]

def zeroLeft(array : Array[AnyRef], index : Int) : Unit

def zeroRight(array : Array[AnyRef], index : Int) : Unit

def copyLeft(array : Array[AnyRef], right : Int) : Array[AnyRef]

def copyRight(array : Array[AnyRef], left : Int) : Array[AnyRef]