PagedSeq
An implementation of lazily computed sequences, where elements are stored
in "pages", i.e. arrays of fixed size.
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 -
The
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.
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
Value members
Methods
The length of the paged sequence
- Note
- Calling this method will force the entire sequence to be read.
Predicate method to check if an element is defined
at position
Unlike
a lazy sequence to the end.
at position
index
of the current sequence.Unlike
length
this operation does not force readinga lazy sequence to the end.
- Definition Classes
- SeqOps -> PartialFunction
The subsequence from index
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
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
Inherited methods
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
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
@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
@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
override def foldRight[B](z: B)(op: (A, B) => B): B
- Definition Classes
- IndexedSeqOps -> IterableOnceOps
- Inhertied from
- IndexedSeqOps
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
@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
@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
override def stepper[S <: Stepper[]](shape: StepperShape[A, S]): S & EfficientSplit
- Definition Classes
- IndexedSeqOps -> IterableOnce
- Inhertied from
- IndexedSeqOps
@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
@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
@inline @deprecated("Use segmentLength instead of prefixLength", "2.13.0")
final def prefixLength(p: A => Boolean): Int
- Inhertied from
- SeqOps
override def map[B](f: A => B): CC[B]
- Definition Classes
- IndexedSeqOps -> IterableOps -> IterableOnceOps
- Inhertied from
- IndexedSeqOps
@inline
final override def concat[B >: A](suffix: IterableOnce[B]): CC[B]
- Definition Classes
- SeqOps -> IterableOps
- Inhertied from
- SeqOps
override def knownSize: Int
- Definition Classes
- IndexedSeqOps -> IterableOnce
- Inhertied from
- IndexedSeqOps
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
@inline @deprecated("Use .iterator instead of .toIterator", "2.13.0")
final def toIterator: Iterator[A]
- 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
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
override def search[B >: A](elem: B, from: Int, to: Int)(ord: Ordering[B]): SearchResult
- Definition Classes
- IndexedSeqOps -> SeqOps
- Inhertied from
- IndexedSeqOps
override def search[B >: A](elem: B)(ord: Ordering[B]): SearchResult
- Definition Classes
- IndexedSeqOps -> SeqOps
- Inhertied from
- IndexedSeqOps
@deprecated("Use toIterable instead", "2.13.0")
final def toTraversable: Iterable[A]
- Inhertied from
- IterableOps
def zipAll[A1 >: A, B](that: Iterable[B], thisElem: A1, thatElem: B): CC[(A1, B)]
- Inhertied from
- IterableOps
@inline @deprecatedOverriding("Use iterableFactory instead", "2.13.0") @deprecated("Use iterableFactory instead", "2.13.0")
def companion: IterableFactory[CC]
- Inhertied from
- IterableOps
override protected def reversed: Iterable[A]
- Definition Classes
- IndexedSeqOps -> IterableOnceOps
- Inhertied from
- IndexedSeqOps
override def tapEach[U](f: A => U): C
- Definition Classes
- IterableOps -> IterableOnceOps
- Inhertied from
- IterableOps
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
override def empty: CC[A]
- Definition Classes
- IterableFactoryDefaults -> IterableOps
- Inhertied from
- IterableFactoryDefaults
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
@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 @deprecated("Use foldRight instead of :\\", "2.13.0")
final def :\[B](z: B)(op: (A, B) => B): B
- Inhertied from
- IterableOnceOps
def scala$collection$SeqOps$$super$concat[B >: A](suffix: IterableOnce[B]): CC[B]
- 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
@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
@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
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
@inline @deprecated("Use foldLeft instead of /:", "2.13.0")
final def /:[B](z: B)(op: (B, A) => B): B
- 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
override def reverseIterator: Iterator[A]
- Definition Classes
- IndexedSeqOps -> SeqOps
- Inhertied from
- IndexedSeqOps
override def splitAt(n: Int): (C, C)
- Definition Classes
- IterableOps -> IterableOnceOps
- Inhertied from
- IterableOps
override def headOption: Option[A]
- Definition Classes
- IndexedSeqOps -> IterableOps
- Inhertied from
- IndexedSeqOps
@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