Slice

final class Slice[T](val underlying: IndexedSeq[T], _from: Int, _until: Int) extends Slice[T]

An IndexedSeqView.Slice that surfaces the underlying sequence as well as the index range.

An IndexedSeqView.Slice that surfaces the underlying sequence as well as the index range.

Companion
object
class Slice[T]
class AbstractIndexedSeqView[T]
trait IndexedSeqView[T]
trait IndexedSeqOps[T, [A] =>> View[A], View[T]]
class AbstractSeqView[T]
trait SeqView[T]
trait SeqOps[T, [A] =>> View[A], View[T]]
class AbstractView[T]
trait View[T]
trait Serializable
class AbstractIterable[T]
trait Iterable[T]
trait IterableFactoryDefaults[T, [A] =>> View[A]]
trait IterableOps[T, [A] =>> View[A], View[T]]
trait IterableOnceOps[T, [A] =>> View[A], View[T]]
trait IterableOnce[T]
class Object
trait Matchable
class Any

Value members

Concrete methods

def from: Int
def merge(that: Slice[T]): Slice[T]

Merges this slice with the given slice. Requires that the two slices represent directly adjacent chunks of the underlying sequence. If not an IllegalArgumentException is thrown.

Merges this slice with the given slice. Requires that the two slices represent directly adjacent chunks of the underlying sequence. If not an IllegalArgumentException is thrown.

def until: Int

Inherited methods

@inline
final def ++[B >: T](suffix: IterableOnce[B]): View[B]
Inherited from
IterableOps
@inline
final override def ++:[B >: T](prefix: IterableOnce[B]): View[B]
Definition Classes
SeqOps -> IterableOps
Inherited from
SeqOps
@inline
final def +:[B >: T](elem: B): View[B]
Inherited from
SeqOps
@inline
final def :+[B >: T](elem: B): View[B]
Inherited from
SeqOps
@inline
final def :++[B >: T](suffix: IterableOnce[B]): View[B]
Inherited from
SeqOps
def `scala$collection$SeqOps$$super$concat`[B >: T](suffix: IterableOnce[B]): View[B]
Inherited from
SeqOps
Inherited from
SeqOps
Inherited from
SeqOps
@inline
final def addString(b: StringBuilder): StringBuilder
Inherited from
IterableOnceOps
@inline
final def addString(b: StringBuilder, sep: String): StringBuilder
Inherited from
IterableOnceOps
def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
Inherited from
IterableOnceOps
override def appended[B >: T](elem: B): IndexedSeqView[B]
Definition Classes
IndexedSeqView -> SeqView -> SeqOps
Inherited from
IndexedSeqView
def appendedAll[B >: T](suffix: SomeIndexedSeqOps[B]): IndexedSeqView[B]
Inherited from
IndexedSeqView
def appendedAll[B >: T](suffix: SomeSeqOps[B]): SeqView[B]
Inherited from
SeqView
def appendedAll[B >: T](suffix: IterableOnce[B]): View[B]
Inherited from
SeqOps
@throws(scala.this.throws.$lessinit$greater$default$1[scala.IndexOutOfBoundsException])
def apply(i: Int): T
Inherited from
Slice
def collect[B](pf: PartialFunction[T, B]): View[B]
Inherited from
IterableOps
def collectFirst[B](pf: PartialFunction[T, B]): Option[B]
Inherited from
IterableOnceOps
def combinations(n: Int): Iterator[View[T]]
Inherited from
SeqOps
def concat[B >: T](suffix: SomeIndexedSeqOps[B]): IndexedSeqView[B]
Inherited from
IndexedSeqView
def concat[B >: T](suffix: SomeSeqOps[B]): SeqView[B]
Inherited from
SeqView
@inline
final override def concat[B >: T](suffix: IterableOnce[B]): View[B]
Definition Classes
SeqOps -> IterableOps
Inherited from
SeqOps
def contains[A1 >: T](elem: A1): Boolean
Inherited from
SeqOps
def containsSlice[B >: T](that: Seq[B]): Boolean
Inherited from
SeqOps
def copyToArray[B >: T](xs: Array[B], start: Int, len: Int): Int
Inherited from
IterableOnceOps
@deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
def copyToArray[B >: T](xs: Array[B], start: Int): Int
Inherited from
IterableOnceOps
@deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
def copyToArray[B >: T](xs: Array[B]): Int
Inherited from
IterableOnceOps
def corresponds[B](that: IterableOnce[B])(p: (T, B) => Boolean): Boolean
Inherited from
IterableOnceOps
def corresponds[B](that: Seq[B])(p: (T, B) => Boolean): Boolean
Inherited from
SeqOps
def count(p: T => Boolean): Int
Inherited from
IterableOnceOps
def diff[B >: T](that: Seq[B]): View[T]
Inherited from
SeqOps
def distinct: View[T]
Inherited from
SeqOps
def distinctBy[B](f: T => B): View[T]
Inherited from
SeqOps
override def drop(n: Int): IndexedSeqView[T]
Definition Classes
IndexedSeqView -> SeqView -> IndexedSeqOps -> IterableOps -> IterableOnceOps
Inherited from
IndexedSeqView
override def dropRight(n: Int): IndexedSeqView[T]
Definition Classes
IndexedSeqView -> SeqView -> IndexedSeqOps -> IterableOps
Inherited from
IndexedSeqView
def dropWhile(p: T => Boolean): View[T]
Inherited from
IterableOps
override def empty: View[T]
Definition Classes
View -> IterableFactoryDefaults -> IterableOps
Inherited from
View
def endsWith[B >: T](that: Iterable[B]): Boolean
Inherited from
SeqOps
def exists(p: T => Boolean): Boolean
Inherited from
IterableOnceOps
def filter(pred: T => Boolean): View[T]
Inherited from
IterableOps
def filterNot(pred: T => Boolean): View[T]
Inherited from
IterableOps
def find(p: T => Boolean): Option[T]
Inherited from
IterableOnceOps
def findLast(p: T => Boolean): Option[T]
Inherited from
SeqOps
def flatMap[B](f: T => IterableOnce[B]): View[B]
Inherited from
IterableOps
def flatten[B](asIterable: T => IterableOnce[B]): View[B]
Inherited from
IterableOps
def fold[A1 >: T](z: A1)(op: (A1, A1) => A1): A1
Inherited from
IterableOnceOps
def foldLeft[B](z: B)(op: (B, T) => B): B
Inherited from
IterableOnceOps
override def foldRight[B](z: B)(op: (T, B) => B): B
Definition Classes
IndexedSeqOps -> IterableOnceOps
Inherited from
IndexedSeqOps
def forall(p: T => Boolean): Boolean
Inherited from
IterableOnceOps
def foreach[U](f: T => U): Unit
Inherited from
IterableOnceOps
protected def fromSpecific(coll: IterableOnce[T]): View[T]
Inherited from
IterableFactoryDefaults
def groupBy[K](f: T => K): Map[K, View[T]]
Inherited from
IterableOps
def groupMap[K, B](key: T => K)(f: T => B): Map[K, View[B]]
Inherited from
IterableOps
def groupMapReduce[K, B](key: T => K)(f: T => B)(reduce: (B, B) => B): Map[K, B]
Inherited from
IterableOps
def grouped(size: Int): Iterator[View[T]]
Inherited from
IterableOps
override def head: T
Definition Classes
IndexedSeqOps -> IterableOps
Inherited from
IndexedSeqOps
override def headOption: Option[T]
Definition Classes
IndexedSeqOps -> IterableOps
Inherited from
IndexedSeqOps
@deprecatedOverriding("Override indexOf(elem, from) instead - indexOf(elem) calls indexOf(elem, 0)", "2.13.0")
def indexOf[B >: T](elem: B): Int
Inherited from
SeqOps
def indexOf[B >: T](elem: B, from: Int): Int
Inherited from
SeqOps
@deprecatedOverriding("Override indexOfSlice(that, from) instead - indexOfSlice(that) calls indexOfSlice(that, 0)", "2.13.0")
def indexOfSlice[B >: T](that: Seq[B]): Int
Inherited from
SeqOps
def indexOfSlice[B >: T](that: Seq[B], from: Int): Int
Inherited from
SeqOps
@deprecatedOverriding("Override indexWhere(p, from) instead - indexWhere(p) calls indexWhere(p, 0)", "2.13.0")
def indexWhere(p: T => Boolean): Int
Inherited from
SeqOps
def indexWhere(p: T => Boolean, from: Int): Int
Inherited from
SeqOps
def indices: Range
Inherited from
SeqOps
def init: View[T]
Inherited from
IterableOps
def inits: Iterator[View[T]]
Inherited from
IterableOps
def intersect[B >: T](that: Seq[B]): View[T]
Inherited from
SeqOps
def isDefinedAt(idx: Int): Boolean
Inherited from
SeqOps
override def isEmpty: Boolean
Definition Classes
SeqOps -> IterableOnceOps
Inherited from
SeqOps
override def isTraversableAgain: Boolean
Definition Classes
IterableOps -> IterableOnceOps
Inherited from
IterableOps
override def iterableFactory: IterableFactory[[A] =>> View[A]]
Definition Classes
View -> Iterable -> IterableOps
Inherited from
View
override def iterator: Iterator[T]
Definition Classes
IndexedSeqView -> IndexedSeqOps -> IterableOnce
Inherited from
IndexedSeqView
override def knownSize: Int
Definition Classes
IndexedSeqOps -> IterableOnce
Inherited from
IndexedSeqOps
override def last: T
Definition Classes
IndexedSeqOps -> IterableOps
Inherited from
IndexedSeqOps
def lastIndexOf[B >: T](elem: B, end: Int): Int
Inherited from
SeqOps
@deprecatedOverriding("Override lastIndexOfSlice(that, end) instead - lastIndexOfSlice(that) calls lastIndexOfSlice(that, Int.MaxValue)", "2.13.0")
def lastIndexOfSlice[B >: T](that: Seq[B]): Int
Inherited from
SeqOps
def lastIndexOfSlice[B >: T](that: Seq[B], end: Int): Int
Inherited from
SeqOps
@deprecatedOverriding("Override lastIndexWhere(p, end) instead - lastIndexWhere(p) calls lastIndexWhere(p, Int.MaxValue)", "2.13.0")
def lastIndexWhere(p: T => Boolean): Int
Inherited from
SeqOps
def lastIndexWhere(p: T => Boolean, end: Int): Int
Inherited from
SeqOps
def lastOption: Option[T]
Inherited from
IterableOps
def lazyZip[B](that: Iterable[B]): LazyZip2[T, B, Slice[T]]
Inherited from
Iterable
def length: Int
Inherited from
Slice
final override def lengthCompare(that: Iterable[_]): Int
Definition Classes
IndexedSeqOps -> SeqOps
Inherited from
IndexedSeqOps
final override def lengthCompare(len: Int): Int
Definition Classes
IndexedSeqOps -> SeqOps
Inherited from
IndexedSeqOps
@inline
final def lengthIs: SizeCompareOps
Inherited from
SeqOps
override def map[B](f: T => B): IndexedSeqView[B]
Definition Classes
IndexedSeqView -> SeqView -> IndexedSeqOps -> IterableOps -> IterableOnceOps
Inherited from
IndexedSeqView
def max[B >: T](ord: Ordering[B]): T
Inherited from
IterableOnceOps
def maxBy[B](f: T => B)(cmp: Ordering[B]): T
Inherited from
IterableOnceOps
def maxByOption[B](f: T => B)(cmp: Ordering[B]): Option[T]
Inherited from
IterableOnceOps
def maxOption[B >: T](ord: Ordering[B]): Option[T]
Inherited from
IterableOnceOps
def min[B >: T](ord: Ordering[B]): T
Inherited from
IterableOnceOps
def minBy[B](f: T => B)(cmp: Ordering[B]): T
Inherited from
IterableOnceOps
def minByOption[B](f: T => B)(cmp: Ordering[B]): Option[T]
Inherited from
IterableOnceOps
def minOption[B >: T](ord: Ordering[B]): Option[T]
Inherited from
IterableOnceOps
@inline
final def mkString: String
Inherited from
IterableOnceOps
@inline
final def mkString(sep: String): String
Inherited from
IterableOnceOps
final def mkString(start: String, sep: String, end: String): String
Inherited from
IterableOnceOps
protected def newSpecificBuilder: Builder[T, View[T]]
Inherited from
IterableFactoryDefaults
@deprecatedOverriding("nonEmpty is defined as !isEmpty; override isEmpty instead", "2.13.0")
def nonEmpty: Boolean
Inherited from
IterableOnceOps
def padTo[B >: T](len: Int, elem: B): View[B]
Inherited from
SeqOps
def partition(p: T => Boolean): (View[T], View[T])
Inherited from
IterableOps
def partitionMap[A1, A2](f: T => Either[A1, A2]): (View[A1], View[A2])
Inherited from
IterableOps
def patch[B >: T](from: Int, other: IterableOnce[B], replaced: Int): View[B]
Inherited from
SeqOps
def permutations: Iterator[View[T]]
Inherited from
SeqOps
override def prepended[B >: T](elem: B): IndexedSeqView[B]
Definition Classes
IndexedSeqView -> SeqView -> IndexedSeqOps -> SeqOps
Inherited from
IndexedSeqView
def prependedAll[B >: T](prefix: SomeIndexedSeqOps[B]): IndexedSeqView[B]
Inherited from
IndexedSeqView
def prependedAll[B >: T](prefix: SomeSeqOps[B]): SeqView[B]
Inherited from
SeqView
def prependedAll[B >: T](prefix: IterableOnce[B]): View[B]
Inherited from
SeqOps
def product[B >: T](num: Numeric[B]): B
Inherited from
IterableOnceOps
def reduce[B >: T](op: (B, B) => B): B
Inherited from
IterableOnceOps
def reduceLeft[B >: T](op: (B, T) => B): B
Inherited from
IterableOnceOps
def reduceLeftOption[B >: T](op: (B, T) => B): Option[B]
Inherited from
IterableOnceOps
def reduceOption[B >: T](op: (B, B) => B): Option[B]
Inherited from
IterableOnceOps
def reduceRight[B >: T](op: (T, B) => B): B
Inherited from
IterableOnceOps
def reduceRightOption[B >: T](op: (T, B) => B): Option[B]
Inherited from
IterableOnceOps
override def reverse: IndexedSeqView[T]
Definition Classes
IndexedSeqView -> SeqView -> IndexedSeqOps -> SeqOps
Inherited from
IndexedSeqView
override def reverseIterator: Iterator[T]
Definition Classes
IndexedSeqView -> IndexedSeqOps -> SeqOps
Inherited from
IndexedSeqView
override protected def reversed: Iterable[T]
Definition Classes
IndexedSeqOps -> IterableOnceOps
Inherited from
IndexedSeqOps
def sameElements[B >: T](that: IterableOnce[B]): Boolean
Inherited from
SeqOps
def scan[B >: T](z: B)(op: (B, B) => B): View[B]
Inherited from
IterableOps
def scanLeft[B](z: B)(op: (B, T) => B): View[B]
Inherited from
IterableOps
def scanRight[B](z: B)(op: (T, B) => B): View[B]
Inherited from
IterableOps
override def search[B >: T](elem: B, from: Int, to: Int)(ord: Ordering[B]): SearchResult
Definition Classes
IndexedSeqOps -> SeqOps
Inherited from
IndexedSeqOps
override def search[B >: T](elem: B)(ord: Ordering[B]): SearchResult
Definition Classes
IndexedSeqOps -> SeqOps
Inherited from
IndexedSeqOps
def segmentLength(p: T => Boolean, from: Int): Int
Inherited from
SeqOps
final def segmentLength(p: T => Boolean): Int
Inherited from
SeqOps
final override def size: Int
Definition Classes
SeqOps -> IterableOnceOps
Inherited from
SeqOps
final override def sizeCompare(that: Iterable[_]): Int
Definition Classes
SeqOps -> IterableOps
Inherited from
SeqOps
final override def sizeCompare(otherSize: Int): Int
Definition Classes
SeqOps -> IterableOps
Inherited from
SeqOps
@inline
final def sizeIs: SizeCompareOps
Inherited from
IterableOps
override def slice(from: Int, until: Int): IndexedSeqView[T]
Definition Classes
IndexedSeqView -> IndexedSeqOps -> IterableOps -> IterableOnceOps
Inherited from
IndexedSeqView
def sliding(size: Int, step: Int): Iterator[View[T]]
Inherited from
IterableOps
def sliding(size: Int): Iterator[View[T]]
Inherited from
IterableOps
def sortBy[B](f: T => B)(ord: Ordering[B]): View[T]
Inherited from
SeqOps
def sortWith(lt: (T, T) => Boolean): View[T]
Inherited from
SeqOps
override def sorted[B >: T](ord: Ordering[B]): SeqView[T]
Definition Classes
SeqView -> SeqOps
Inherited from
SeqView
def span(p: T => Boolean): (View[T], View[T])
Inherited from
IterableOps
override def splitAt(n: Int): (View[T], View[T])
Definition Classes
IterableOps -> IterableOnceOps
Inherited from
IterableOps
def startsWith[B >: T](that: IterableOnce[B], offset: Int): Boolean
Inherited from
SeqOps
override def stepper[S <: Stepper[_]](shape: StepperShape[T, S]): S & EfficientSplit
Definition Classes
IndexedSeqOps -> IterableOnce
Inherited from
IndexedSeqOps
def sum[B >: T](num: Numeric[B]): B
Inherited from
IterableOnceOps
def tail: View[T]
Inherited from
IterableOps
def tails: Iterator[View[T]]
Inherited from
IterableOps
override def take(n: Int): IndexedSeqView[T]
Definition Classes
IndexedSeqView -> SeqView -> IndexedSeqOps -> IterableOps -> IterableOnceOps
Inherited from
IndexedSeqView
override def takeRight(n: Int): IndexedSeqView[T]
Definition Classes
IndexedSeqView -> SeqView -> IndexedSeqOps -> IterableOps
Inherited from
IndexedSeqView
def takeWhile(p: T => Boolean): View[T]
Inherited from
IterableOps
override def tapEach[U](f: T => U): IndexedSeqView[T]
Definition Classes
IndexedSeqView -> SeqView -> IterableOps -> IterableOnceOps
Inherited from
IndexedSeqView
def to[C1](factory: Factory[T, C1]): C1
Inherited from
IterableOnceOps
def toArray[B >: T](ClassTag[B]): Array[B]
Inherited from
IterableOnceOps
@inline
final def toBuffer[B >: T]: Buffer[B]
Inherited from
IterableOnceOps
def toIndexedSeq: IndexedSeq[T]
Inherited from
IterableOnceOps
final def toIterable: Slice[T]
Inherited from
Iterable
def toList: List[T]
Inherited from
IterableOnceOps
def toMap[K, V](ev: T <:< (K, V)): Map[K, V]
Inherited from
IterableOnceOps
def toSeq: Seq[T]
Inherited from
IterableOnceOps
def toSet[B >: T]: Set[B]
Inherited from
IterableOnceOps
override def toString(): String
Definition Classes
View -> Iterable -> Any
Inherited from
View
def toVector: Vector[T]
Inherited from
IterableOnceOps
def transpose[B](asIterable: T => Iterable[B]): View[View[B]]
Inherited from
IterableOps
def unzip[A1, A2](asPair: T => (A1, A2)): (View[A1], View[A2])
Inherited from
IterableOps
def unzip3[A1, A2, A3](asTriple: T => (A1, A2, A3)): (View[A1], View[A2], View[A3])
Inherited from
IterableOps
def updated[B >: T](index: Int, elem: B): View[B]
Inherited from
SeqOps
override def view: IndexedSeqView[T]
Definition Classes
IndexedSeqView -> SeqView -> View -> IndexedSeqOps -> SeqOps -> IterableOps
Inherited from
IndexedSeqView
def withFilter(p: T => Boolean): WithFilter[T, [A] =>> View[A]]
Inherited from
IterableOps
def zip[B](that: IterableOnce[B]): View[(T, B)]
Inherited from
IterableOps
def zipAll[A1 >: T, B](that: Iterable[B], thisElem: A1, thatElem: B): View[(A1, B)]
Inherited from
IterableOps
def zipWithIndex: View[(T, Int)]
Inherited from
IterableOps

Deprecated and Inherited methods

@inline @deprecated("Use foldLeft instead of /:", "2.13.0")
final def /:[B](z: B)(op: (B, T) => B): B
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("Use foldRight instead of :\\", "2.13.0")
final def :\[B](z: B)(op: (T, B) => B): B
Deprecated
Inherited 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, T) => B, combop: (B, B) => B): B
Deprecated
Inherited from
IterableOnceOps
@inline @deprecatedOverriding("Use iterableFactory instead", "2.13.0") @deprecated("Use iterableFactory instead", "2.13.0")
def companion: IterableFactory[[A] =>> View[A]]
Deprecated
Inherited from
IterableOps
@inline @deprecated("Use `dest ++= coll` instead", "2.13.0")
final def copyToBuffer[B >: T](dest: Buffer[B]): Unit
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("Views no longer know about their underlying collection type; .force always returns an IndexedSeq", "2.13.0")
def force: IndexedSeq[T]
Deprecated
Inherited from
View
@deprecated("Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)", "2.13.0")
def hasDefiniteSize: Boolean
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("Use segmentLength instead of prefixLength", "2.13.0")
final def prefixLength(p: T => Boolean): Int
Deprecated
Inherited 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: View[T]
Deprecated
Inherited from
IterableOps
@deprecated("Use .reverseIterator.map(f).to(...) instead of .reverseMap(f)", "2.13.0")
def reverseMap[B](f: T => B): View[B]
Deprecated
Inherited from
SeqOps
@deprecated("Iterable.seq always returns the iterable itself", "2.13.0")
def seq: Slice[T]
Deprecated
Inherited from
Iterable
@inline @deprecated("Use .iterator instead of .toIterator", "2.13.0")
final def toIterator: Iterator[T]
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("Use .to(LazyList) instead of .toStream", "2.13.0")
final def toStream: Stream[T]
Deprecated
Inherited from
IterableOnceOps
@deprecated("Use toIterable instead", "2.13.0")
final def toTraversable: Iterable[T]
Deprecated
Inherited from
IterableOps
@inline @deprecated("Use `concat` instead", "2.13.0")
final def union[B >: T](that: Seq[B]): View[B]
Deprecated
Inherited from
SeqOps
@deprecated("Use .view.slice(from, until) instead of .view(from, until)", "2.13.0")
override def view(from: Int, until: Int): IndexedSeqView[T]
Deprecated
Definition Classes
IndexedSeqView -> IndexedSeqOps -> IterableOps
Inherited from
IndexedSeqView

Concrete fields

val underlying: IndexedSeq[T]