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 parameters:
- T
the type of the elements contained in this paged sequence, with an
ClassTag
context bound.
- Companion:
- object
Value members
Concrete methods
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.
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
The length of the paged sequence
The length of the paged sequence
- Note:
Calling this method will force the entire sequence to be read.
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.
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
Inherited methods
- Inherited from:
- IterableOnceOps
- Inherited from:
- IterableOnceOps
- Inherited from:
- SeqOps
- Inherited from:
- SeqOps
- Inherited from:
- SeqOps
- Inherited from:
- SeqOps
- Inherited from:
- SeqOps
- Inherited from:
- IterableOnceOps
- Inherited from:
- IterableOps
Deprecated and Inherited methods
- Deprecated
[Since version 2.13.0]
Use foldLeft instead of /:- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use foldRight instead of :\\- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use iterableFactory instead- Inherited from:
- IterableOps
- Deprecated
[Since version 2.13.0]
Use `dest ++= coll` instead- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use segmentLength instead of prefixLength- Inherited from:
- SeqOps
- Deprecated
[Since version 2.13.0]
Use coll instead of repr in a collection implementation, use the collection value itself from the outside- Inherited from:
- IterableOps
- Deprecated
[Since version 2.13.0]
Use .reverseIterator.map(f).to(...) instead of .reverseMap(f)- Inherited from:
- SeqOps
- Deprecated
[Since version 2.13.0]
Iterable.seq always returns the iterable itself- Inherited from:
- Iterable
- Deprecated
[Since version 2.13.0]
Use .iterator instead of .toIterator- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use .to(LazyList) instead of .toStream- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use toIterable instead- Inherited from:
- IterableOps
- Deprecated
[Since version 2.13.0]
Use `concat` instead- Inherited from:
- SeqOps
- Deprecated
[Since version 2.13.0]
Use .view.slice(from, until) instead of .view(from, until)- Definition Classes
- Inherited from:
- IndexedSeqOps