PagedSeq

class PagedSeq[T] extends AbstractSeq[T] with IndexedSeq[T] with ScalaVersionSpecificPagedSeq[T]
An implementation of lazily computed sequences, where elements are stored
in "pages", i.e. arrays of fixed size.
A paged sequence is constructed from a function that produces more elements when asked.
The producer function - more, is similar to the read method in java.io.Reader.
The more function takes three parameters: an array of elements, a start index, and an end index.
It should try to fill the array between start and end indices (excluding end index).
It returns the number of elements produced, or -1 if end of logical input stream was reached
before reading any element.
Type Params
T
the type of the elements contained in this paged sequence, with an ClassTag context bound.
Companion
object
trait ScalaVersionSpecificPagedSeq[T]
trait IndexedSeq[T]
trait IndexedSeqOps[T, [A] =>> IndexedSeq[A], IndexedSeq[T]]
class AbstractSeq[T]
trait Seq[T]
trait Equals
trait SeqOps[T, [A] =>> IndexedSeq[A], IndexedSeq[T]]
trait PartialFunction[Int, T]
trait Int => T
class AbstractIterable[T]
trait Iterable[T]
trait IterableFactoryDefaults[T, [A] =>> IndexedSeq[A]]
trait IterableOps[T, [A] =>> IndexedSeq[A], IndexedSeq[T]]
trait IterableOnceOps[T, [A] =>> IndexedSeq[A], IndexedSeq[T]]
trait IterableOnce[T]
class Object
trait Matchable
class Any

Value members

Constructors

def this(more: (Array[T], Int, Int) => Int)(evidence$1: ClassTag[T])

Methods

def length: Int
The length of the paged sequence
Note
Calling this method will force the entire sequence to be read.
def apply(index: Int): T
The element at position index.
override def isDefinedAt(index: Int): Boolean
Predicate method to check if an element is defined
at position index of the current sequence.
Unlike length this operation does not force reading
a lazy sequence to the end.
Definition Classes
SeqOps -> PartialFunction
override def slice(_start: Int, _end: Int): PagedSeq[T]
The subsequence from index start up to end -1 if end
is lesser than the length of the current sequence and up to
length of the sequence otherwise. This is limited up to the length
of the current sequence if end is larger than its length.
Definition Classes
IndexedSeqOps -> IterableOps -> IterableOnceOps
def slice(start: Int): PagedSeq[T]
The subsequence from index start up to
the length of the current sequence.
override def toString: String
Convert sequence to string
Definition Classes
Seq -> Function1 -> Iterable -> Any

Inherited methods

def zipWithIndex: CC[(A, Int)]
Inhertied from
IterableOps
def inits: Iterator[C]
Inhertied from
IterableOps
override def prepended[B >: A](elem: B): CC[B]
Definition Classes
IndexedSeqOps -> SeqOps
Inhertied from
IndexedSeqOps
@deprecatedOverriding("nonEmpty is defined as !isEmpty; override isEmpty instead", "2.13.0")
def nonEmpty: Boolean
Inhertied from
IterableOnceOps
def unzip[A1, A2](asPair: A => (A1, A2)): (CC[A1], CC[A2])
Inhertied from
IterableOps
def forall(p: A => Boolean): Boolean
Inhertied from
IterableOnceOps
def zip[B](that: IterableOnce[B]): CC[(A, B)]
Inhertied from
IterableOps
override def drop(n: Int): C
Definition Classes
IndexedSeqOps -> IterableOps -> IterableOnceOps
Inhertied from
IndexedSeqOps
override def isTraversableAgain: Boolean
Definition Classes
IterableOps -> IterableOnceOps
Inhertied from
IterableOps
def collect[B](pf: PartialFunction[A, B]): CC[B]
Inhertied from
IterableOps
def reduceLeftOption[B >: A](op: (B, A) => B): Option[B]
Inhertied from
IterableOnceOps
@inline @deprecated("Use `dest ++= coll` instead", "2.13.0")
final def copyToBuffer[B >: A](dest: Buffer[B]): Unit
Inhertied from
IterableOnceOps
@deprecatedOverriding("Override indexWhere(p, from) instead - indexWhere(p) calls indexWhere(p, 0)", "2.13.0")
def indexWhere(p: A => Boolean): Int
Inhertied from
SeqOps
def indexWhere(p: A => Boolean, from: Int): Int
Inhertied from
SeqOps
def sortWith(lt: (A, A) => Boolean): C
Inhertied from
SeqOps
def init: C
Inhertied from
IterableOps
@inline
final def addString(b: StringBuilder): StringBuilder
Inhertied from
IterableOnceOps
@inline
final def addString(b: StringBuilder, sep: String): StringBuilder
Inhertied from
IterableOnceOps
def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
Inhertied from
IterableOnceOps
def foreach[U](f: A => U): Unit
Inhertied from
IterableOnceOps
override def foldRight[B](z: B)(op: (A, B) => B): B
Definition Classes
IndexedSeqOps -> IterableOnceOps
Inhertied from
IndexedSeqOps
def startsWith[B >: A](that: IterableOnce[B], offset: Int): Boolean
Inhertied from
SeqOps
def partition(p: A => Boolean): (C, C)
Inhertied from
IterableOps
def exists(p: A => Boolean): Boolean
Inhertied from
IterableOnceOps
def filterNot(pred: A => Boolean): C
Inhertied from
IterableOps
def lastOption: Option[A]
Inhertied from
IterableOps
def flatMap[B](f: A => IterableOnce[B]): CC[B]
Inhertied from
IterableOps
def orElse[A1 <: A, B1 >: B](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
Inhertied from
PartialFunction
override def takeRight(n: Int): C
Definition Classes
IndexedSeqOps -> IterableOps
Inhertied from
IndexedSeqOps
def maxByOption[B](f: A => B)(cmp: Ordering[B]): Option[A]
Inhertied from
IterableOnceOps
@deprecated("`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.", "2.13.0")
def aggregate[B](z: => B)(seqop: (B, A) => B, combop: (B, B) => B): B
Inhertied from
IterableOnceOps
def scan[B >: A](z: B)(op: (B, B) => B): CC[B]
Inhertied from
IterableOps
def reduceRight[B >: A](op: (A, B) => B): B
Inhertied from
IterableOnceOps
@deprecatedOverriding("Override lastIndexOfSlice(that, end) instead - lastIndexOfSlice(that) calls lastIndexOfSlice(that, Int.MaxValue)", "2.13.0")
def lastIndexOfSlice[B >: A](that: Seq[B]): Int
Inhertied from
SeqOps
def lastIndexOfSlice[B >: A](that: Seq[B], end: Int): Int
Inhertied from
SeqOps
def count(p: A => Boolean): Int
Inhertied from
IterableOnceOps
def dropWhile(p: A => Boolean): C
Inhertied from
IterableOps
protected def fromSpecific(coll: IterableOnce[A]): CC[A]
Inhertied from
IterableFactoryDefaults
override def stepper[S <: Stepper[]](shape: StepperShape[A, S]): S & EfficientSplit
Definition Classes
IndexedSeqOps -> IterableOnce
Inhertied from
IndexedSeqOps
def flatten[B](asIterable: A => IterableOnce[B]): CC[B]
Inhertied from
IterableOps
def toArray[B >: A](ClassTag[B]): Array[B]
Inhertied from
IterableOnceOps
@deprecated("Iterable.seq always returns the iterable itself", "2.13.0")
def seq: Iterable
Inhertied from
Iterable
@deprecated("Use .reverseIterator.map(f).to(...) instead of .reverseMap(f)", "2.13.0")
def reverseMap[B](f: A => B): CC[B]
Inhertied from
SeqOps
def toMap[K, V](ev: A <:< (K, V)): Map[K, V]
Inhertied from
IterableOnceOps
@inline
final override def ++:[B >: A](prefix: IterableOnce[B]): CC[B]
Definition Classes
SeqOps -> IterableOps
Inhertied from
SeqOps
@deprecated("Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)", "2.13.0")
def hasDefiniteSize: Boolean
Inhertied from
IterableOnceOps
def scanLeft[B](z: B)(op: (B, A) => B): CC[B]
Inhertied from
IterableOps
def distinct: C
Inhertied from
SeqOps
def distinctBy[B](f: A => B): C
Inhertied from
SeqOps
def filter(pred: A => Boolean): C
Inhertied from
IterableOps
def unapply(a: A): Option[B]
Inhertied from
PartialFunction
@inline @deprecated("Use segmentLength instead of prefixLength", "2.13.0")
final def prefixLength(p: A => Boolean): Int
Inhertied from
SeqOps
def tail: C
Inhertied from
IterableOps
def patch[B >: A](from: Int, other: IterableOnce[B], replaced: Int): CC[B]
Inhertied from
SeqOps
def toIndexedSeq: IndexedSeq[A]
Inhertied from
IterableOnceOps
def sorted[B >: A](ord: Ordering[B]): C
Inhertied from
SeqOps
def withFilter(p: A => Boolean): WithFilter[A, CC]
Inhertied from
IterableOps
def groupMap[K, B](key: A => K)(f: A => B): Map[K, CC[B]]
Inhertied from
IterableOps
override def map[B](f: A => B): CC[B]
Definition Classes
IndexedSeqOps -> IterableOps -> IterableOnceOps
Inhertied from
IndexedSeqOps
def lift: A => Option[B]
Inhertied from
PartialFunction
@inline
final override def concat[B >: A](suffix: IterableOnce[B]): CC[B]
Definition Classes
SeqOps -> IterableOps
Inhertied from
SeqOps
def toList: List[A]
Inhertied from
IterableOnceOps
override def knownSize: Int
Definition Classes
IndexedSeqOps -> IterableOnce
Inhertied from
IndexedSeqOps
def maxBy[B](f: A => B)(cmp: Ordering[B]): A
Inhertied from
IterableOnceOps
def reduceOption[B >: A](op: (B, B) => B): Option[B]
Inhertied from
IterableOnceOps
def toSeq: Seq[A]
Inhertied from
IterableOnceOps
def elementWise: ElementWiseExtractor[A, B]
Inhertied from
PartialFunction
def groupMapReduce[K, B](key: A => K)(f: A => B)(reduce: (B, B) => B): Map[K, B]
Inhertied from
IterableOps
@inline @deprecated("Use .to(LazyList) instead of .toStream", "2.13.0")
final def toStream: Stream[A]
Inhertied from
IterableOnceOps
def contains[A1 >: A](elem: A1): Boolean
Inhertied from
SeqOps
override def last: A
Definition Classes
IndexedSeqOps -> IterableOps
Inhertied from
IndexedSeqOps
@inline @deprecated("Use .iterator instead of .toIterator", "2.13.0")
final def toIterator: Iterator[A]
Inhertied from
IterableOnceOps
def product[B >: A](num: Numeric[B]): B
Inhertied from
IterableOnceOps
def runWith[U](action: B => U): A => Boolean
Inhertied from
PartialFunction
protected def newSpecificBuilder: Builder[A, CC[A]]
Inhertied from
IterableFactoryDefaults
def groupBy[K](f: A => K): Map[K, C]
Inhertied from
IterableOps
def collectFirst[B](pf: PartialFunction[A, B]): Option[B]
Inhertied from
IterableOnceOps
def minByOption[B](f: A => B)(cmp: Ordering[B]): Option[A]
Inhertied from
IterableOnceOps
def span(p: A => Boolean): (C, C)
Inhertied from
IterableOps
def reduce[B >: A](op: (B, B) => B): B
Inhertied from
IterableOnceOps
final override def sizeCompare(that: Iterable[]): Int
Definition Classes
SeqOps -> IterableOps
Inhertied from
SeqOps
final override def sizeCompare(otherSize: Int): Int
Definition Classes
SeqOps -> IterableOps
Inhertied from
SeqOps
@inline
final def lengthIs: SizeCompareOps
Inhertied from
SeqOps
def segmentLength(p: A => Boolean, from: Int): Int
Inhertied from
SeqOps
final def segmentLength(p: A => Boolean): Int
Inhertied from
SeqOps
@inline
final def ++[B >: A](suffix: IterableOnce[B]): CC[B]
Inhertied from
IterableOps
def andThen[C](k: PartialFunction[B, C]): PartialFunction[A, C]
Inhertied from
PartialFunction
override def andThen[C](k: B => C): PartialFunction[A, C]
Definition Classes
PartialFunction -> Function1
Inhertied from
PartialFunction
override def take(n: Int): C
Definition Classes
IndexedSeqOps -> IterableOps -> IterableOnceOps
Inhertied from
IndexedSeqOps
def sortBy[B](f: A => B)(ord: Ordering[B]): C
Inhertied from
SeqOps
def endsWith[B >: A](that: Iterable[B]): Boolean
Inhertied from
SeqOps
@deprecated("Use toIterable instead", "2.13.0")
final def toTraversable: Iterable[A]
Inhertied from
IterableOps
def padTo[B >: A](len: Int, elem: B): CC[B]
Inhertied from
SeqOps
def minOption[B >: A](ord: Ordering[B]): Option[A]
Inhertied from
IterableOnceOps
def appended[B >: A](elem: B): CC[B]
Inhertied from
SeqOps
def zipAll[A1 >: A, B](that: Iterable[B], thisElem: A1, thatElem: B): CC[(A1, B)]
Inhertied from
IterableOps
def appendedAll[B >: A](suffix: IterableOnce[B]): CC[B]
Inhertied from
SeqOps
override def isEmpty: Boolean
Definition Classes
SeqOps -> IterableOnceOps
Inhertied from
SeqOps
@inline
final def +:[B >: A](elem: B): CC[B]
Inhertied from
SeqOps
def grouped(size: Int): Iterator[C]
Inhertied from
IterableOps
def sliding(size: Int, step: Int): Iterator[C]
Inhertied from
IterableOps
def sliding(size: Int): Iterator[C]
Inhertied from
IterableOps
def indices: Range
Inhertied from
SeqOps
def iterator: Iterator[A]
Inhertied from
IndexedSeqOps
def find(p: A => Boolean): Option[A]
Inhertied from
IterableOnceOps
def maxOption[B >: A](ord: Ordering[B]): Option[A]
Inhertied from
IterableOnceOps
@inline @deprecatedOverriding("Use iterableFactory instead", "2.13.0") @deprecated("Use iterableFactory instead", "2.13.0")
def companion: IterableFactory[CC]
Inhertied from
IterableOps
def toVector: Vector[A]
Inhertied from
IterableOnceOps
override protected def reversed: Iterable[A]
Definition Classes
IndexedSeqOps -> IterableOnceOps
Inhertied from
IndexedSeqOps
def sum[B >: A](num: Numeric[B]): B
Inhertied from
IterableOnceOps
override def tapEach[U](f: A => U): C
Definition Classes
IterableOps -> IterableOnceOps
Inhertied from
IterableOps
def diff[B >: A](that: Seq[B]): C
Inhertied from
SeqOps
override def reverse: C
Definition Classes
IndexedSeqOps -> SeqOps
Inhertied from
IndexedSeqOps
def compose[R](k: PartialFunction[R, A]): PartialFunction[R, B]
Inhertied from
PartialFunction
@unspecialized
def compose[A](g: A => T1): A => R
Inhertied from
Function1
def minBy[B](f: A => B)(cmp: Ordering[B]): A
Inhertied from
IterableOnceOps
def lazyZip[B](that: Iterable[B]): LazyZip2[A, B, Iterable]
Inhertied from
Iterable
def min[B >: A](ord: Ordering[B]): A
Inhertied from
IterableOnceOps
def permutations: Iterator[C]
Inhertied from
SeqOps
def max[B >: A](ord: Ordering[B]): A
Inhertied from
IterableOnceOps
def unzip3[A1, A2, A3](asTriple: A => (A1, A2, A3)): (CC[A1], CC[A2], CC[A3])
Inhertied from
IterableOps
@inline @deprecated("Use `concat` instead", "2.13.0")
final def union[B >: A](that: Seq[B]): CC[B]
Inhertied from
SeqOps
def partitionMap[A1, A2](f: A => Either[A1, A2]): (CC[A1], CC[A2])
Inhertied from
IterableOps
def sameElements[B >: A](that: IterableOnce[B]): Boolean
Inhertied from
SeqOps
@inline
final def sizeIs: SizeCompareOps
Inhertied from
IterableOps
override def empty: CC[A]
Definition Classes
IterableFactoryDefaults -> IterableOps
Inhertied from
IterableFactoryDefaults
def reduceLeft[B >: A](op: (B, A) => B): B
Inhertied from
IterableOnceOps
@inline
final def :++[B >: A](suffix: IterableOnce[B]): CC[B]
Inhertied from
SeqOps
@inline
final def :+[B >: A](elem: B): CC[B]
Inhertied from
SeqOps
override def iterableFactory: SeqFactory[IndexedSeq]
Definition Classes
ScalaVersionSpecificPagedSeq
Inhertied from
ScalaVersionSpecificPagedSeq
final override def lengthCompare(that: Iterable[]): Int
Definition Classes
IndexedSeqOps -> SeqOps
Inhertied from
IndexedSeqOps
final override def lengthCompare(len: Int): Int
Definition Classes
IndexedSeqOps -> SeqOps
Inhertied from
IndexedSeqOps
def toSet[B >: A]: Set[B]
Inhertied from
IterableOnceOps
final def toIterable: Iterable
Inhertied from
Iterable
def lastIndexOf[B >: A](elem: B, end: Int): Int
Inhertied from
SeqOps
@deprecated("Use coll instead of repr in a collection implementation, use the collection value itself from the outside", "2.13.0")
final def repr: C
Inhertied from
IterableOps
@inline
final def toBuffer[B >: A]: Buffer[B]
Inhertied from
IterableOnceOps
def reduceRightOption[B >: A](op: (A, B) => B): Option[B]
Inhertied from
IterableOnceOps
@inline @deprecated("Use foldRight instead of :\\", "2.13.0")
final def :\[B](z: B)(op: (A, B) => B): B
Inhertied from
IterableOnceOps
final override def size: Int
Definition Classes
SeqOps -> IterableOnceOps
Inhertied from
SeqOps
def scala$collection$SeqOps$$super$concat[B >: A](suffix: IterableOnce[B]): CC[B]
Inhertied from
SeqOps
def intersect[B >: A](that: Seq[B]): C
Inhertied from
SeqOps
def findLast(p: A => Boolean): Option[A]
Inhertied from
SeqOps
@deprecatedOverriding("Override lastIndexWhere(p, end) instead - lastIndexWhere(p) calls lastIndexWhere(p, Int.MaxValue)", "2.13.0")
def lastIndexWhere(p: A => Boolean): Int
Inhertied from
SeqOps
def lastIndexWhere(p: A => Boolean, end: Int): Int
Inhertied from
SeqOps
def prependedAll[B >: A](prefix: IterableOnce[B]): CC[B]
Inhertied from
SeqOps
@deprecatedOverriding("Override indexOfSlice(that, from) instead - indexOfSlice(that) calls indexOfSlice(that, 0)", "2.13.0")
def indexOfSlice[B >: A](that: Seq[B]): Int
Inhertied from
SeqOps
def indexOfSlice[B >: A](that: Seq[B], from: Int): Int
Inhertied from
SeqOps
def scala$collection$SeqOps$$super$sizeCompare(that: Iterable[]): Int
Inhertied from
SeqOps
def scala$collection$SeqOps$$super$sizeCompare(otherSize: Int): Int
Inhertied from
SeqOps
def canEqual(that: Any): Boolean
Inhertied from
Seq
@deprecatedOverriding("Override indexOf(elem, from) instead - indexOf(elem) calls indexOf(elem, 0)", "2.13.0")
def indexOf[B >: A](elem: B): Int
Inhertied from
SeqOps
def indexOf[B >: A](elem: B, from: Int): Int
Inhertied from
SeqOps
override def dropRight(n: Int): C
Definition Classes
IndexedSeqOps -> IterableOps
Inhertied from
IndexedSeqOps
def corresponds[B](that: IterableOnce[B])(p: (A, B) => Boolean): Boolean
Inhertied from
IterableOnceOps
def corresponds[B](that: Seq[B])(p: (A, B) => Boolean): Boolean
Inhertied from
SeqOps
@inline
final def mkString: String
Inhertied from
IterableOnceOps
@inline
final def mkString(sep: String): String
Inhertied from
IterableOnceOps
final def mkString(start: String, sep: String, end: String): String
Inhertied from
IterableOnceOps
@inline @deprecated("Use foldLeft instead of /:", "2.13.0")
final def /:[B](z: B)(op: (B, A) => B): B
Inhertied from
IterableOnceOps
def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Int
Inhertied from
IterableOnceOps
@deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
def copyToArray[B >: A](xs: Array[B], start: Int): Int
Inhertied from
IterableOnceOps
@deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
def copyToArray[B >: A](xs: Array[B]): Int
Inhertied from
IterableOnceOps
def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
Inhertied from
IterableOnceOps
override def hashCode(): Int
Definition Classes
Seq -> Any
Inhertied from
Seq
def scanRight[B](z: B)(op: (A, B) => B): CC[B]
Inhertied from
IterableOps
def applyOrElse[A1 <: A, B1 >: B](x: A1, default: A1 => B1): B1
Inhertied from
PartialFunction
def tails: Iterator[C]
Inhertied from
IterableOps
override def reverseIterator: Iterator[A]
Definition Classes
IndexedSeqOps -> SeqOps
Inhertied from
IndexedSeqOps
def containsSlice[B](that: Seq[B]): Boolean
Inhertied from
SeqOps
def combinations(n: Int): Iterator[C]
Inhertied from
SeqOps
def foldLeft[B](z: B)(op: (B, A) => B): B
Inhertied from
IterableOnceOps
def transpose[B](asIterable: A => Iterable[B]): CC[CC[B]]
Inhertied from
IterableOps
override def splitAt(n: Int): (C, C)
Definition Classes
IterableOps -> IterableOnceOps
Inhertied from
IterableOps
def updated[B >: A](index: Int, elem: B): CC[B]
Inhertied from
SeqOps
def takeWhile(p: A => Boolean): C
Inhertied from
IterableOps
override def headOption: Option[A]
Definition Classes
IndexedSeqOps -> IterableOps
Inhertied from
IndexedSeqOps
def to[C1](factory: Factory[A, C1]): C1
Inhertied from
IterableOnceOps
@deprecated("Use .view.slice(from, until) instead of .view(from, until)", "2.13.0")
override def view(from: Int, until: Int): IndexedSeqView[A]
Definition Classes
IndexedSeqOps -> IterableOps
Inhertied from
IndexedSeqOps
override def view: IndexedSeqView[A]
Definition Classes
IndexedSeqOps -> SeqOps -> IterableOps
Inhertied from
IndexedSeqOps
override def equals(o: Any): Boolean
Definition Classes
Seq -> Equals -> Any
Inhertied from
Seq