scala.collection.immutable

class PagedSeq

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

class PagedSeq[T](more : (Array[T], Int, Int) => Int, first : scala.collection.immutable.Page[T], start : Int, end : Int)
extends RandomAccessSeq[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, _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
Methods inherited from RandomAccessSeq
projection, elements, drop, take, reverse, partition, patch, ++, toStream, safeIs
Methods inherited from Seq
lengthCompare, size, isEmpty, concat, last, lastOption, firstOption, headOption, lastIndexOf, findIndexOf, indexOf, map, flatMap, filter, takeWhile, dropWhile, contains, subseq, toArray, toSeq, equalsWith, startsWith, startsWith, endsWith, indexOf, containsSlice
Methods inherited from Collection
stringPrefix
Methods inherited from Iterable
foreach, forall, exists, find, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, mkString, mkString, mkString, addString, addString, addString, copyToArray, hasDefiniteSize
Methods inherited from PartialFunction
orElse, andThen
Methods inherited from Function1
compose
Methods inherited from AnyRef
getClass, hashCode, equals, 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.
Overrides
RandomAccessSeq.slice

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