scala.collection.immutable

class PagedSeq

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

class PagedSeq[T](more : (Array[T], Int, Int) => Int, first1 : scala.collection.immutable.Page[T], start : Int, end : Int)
extends Vector[T]
An implementation of lazily computed sequences, where elements are stored in ``pages'', i.e. arrays of fixed size.
Author
Martin Odersky
Additional Constructor Summary
def this (more : (Array[T], Int, Int) => Int) : PagedSeq[T]
A paged sequence is constructed from a method that produces more characters when asked. The producer method is analogous to the read method in java.io.Reader. It takes three parameters: an array of characters, a start index, and an end index. It should try to fill the array between start and end indices (not including end index). It returns the number of characters produced, or -1 if end of logical input stream was reached before any character was read.
Method Summary
def apply (index : Int) : T
The character at position `index'.
override def isDefinedAt (index : Int) : Boolean
Is character sequence defined at `index'? Unlike `length' this operation does not force reading a lazy sequence to the end.
def length : Int
The length of the character sequence Note: calling this method will force sequence to be read until the end.
override def slice (start : Int) : PagedSeq[T]
the subsequence from index `start' up to the length of the current sequence.
override def slice (_start : Int, _end : Int) : PagedSeq[T]
the subsequence from index `start' up to and excluding the minimum of index `end' and the length of the current sequence.
override def toString : java.lang.String
Convert sequence to string
Methods inherited from Vector
companion
Methods inherited from VectorTemplate
iterator, isEmpty, foreach, forall, exists, find, foldLeft, foldRight, reduceLeft, reduceRight, zip, zipWithIndex, head, tail, last, init, take, drop, takeRight, dropRight, splitAt, takeWhile, dropWhile, span, sameElements, copyToArray, lengthCompare, segmentLength, indexWhere, lastIndexWhere, reverse, reverseIterator, startsWith, endsWith, equals, view, view
Methods inherited from SequenceTemplate
size, zipAll, prefixLength, indexWhere, findIndexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, reversedElements, startsWith, indexOfSeq, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, contains, union, diff, intersect, removeDuplicates, patch, padTo, toSequence, indices, sortWith, findLastIndexOf, equalsWith, containsSlice, projection
Methods inherited from IterableTemplate
elements, toIterable, 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, count, /:, :\, reduceLeftOption, reduceRightOption, headOption, lastOption, copyToBuffer, 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
Additional Constructor Details
def this(more : (Array[T], Int, Int) => Int) : PagedSeq[T]
A paged sequence is constructed from a method that produces more characters when asked. The producer method is analogous to the read method in java.io.Reader. It takes three parameters: an array of characters, a start index, and an end index. It should try to fill the array between start and end indices (not including end index). It returns the number of characters produced, or -1 if end of logical input stream was reached before any character was read.

Method Details
def length : Int
The length of the character sequence Note: calling this method will force sequence to be read until the end.

def apply(index : Int) : T
The character at position `index'.

override def isDefinedAt(index : Int) : Boolean
Is character sequence defined at `index'? Unlike `length' this operation does not force reading a lazy sequence to the end.

override def slice(_start : Int, _end : Int) : PagedSeq[T]
the subsequence from index `start' up to and excluding the minimum of index `end' and the length of the current sequence.

override def slice(start : Int) : PagedSeq[T]
the subsequence from index `start' up to the length of the current sequence.

override def toString : java.lang.String
Convert sequence to string