ChunkLike

zio.ChunkLike

ChunkLike represents the capability for a Chunk to extend Scala's collection library. Because of changes to Scala's collection library in 2.13, separate versions of this trait are implemented for 2.11 / 2.12 and 2.13 / Dotty. This allows code in Chunk to be written without concern for the implementation details of Scala's collection library to the maximum extent possible.

Note that IndexedSeq is not a referentially transparent interface in that it exposes methods that are partial (e.g. apply), allocate mutable state (e.g. iterator), or are purely side effecting (e.g. foreach). Chunk extends IndexedSeq to provide interoperability with Scala's collection library but users should avoid these methods whenever possible.

Attributes

Graph
Supertypes
trait IndexedSeq[A]
trait IndexedSeqOps[A, Chunk, Chunk[A]]
trait IndexedSeq[A]
trait IndexedSeqOps[A, Chunk, Chunk[A]]
trait Seq[A]
trait SeqOps[A, Chunk, Chunk[A]]
trait Seq[A]
trait Equals
trait SeqOps[A, Chunk, Chunk[A]]
trait Int => A
trait Iterable[A]
trait Iterable[A]
trait IterableOps[A, Chunk, Chunk[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Known subtypes
class Chunk[A]
Self type

Members list

Concise view

Value members

Concrete methods

final override def appended[A1 >: A](a1: A1): Chunk[A1]

Attributes

Definition Classes
override def collect[B](pf: PartialFunction[A, B]): Chunk[B]

Returns a filtered, mapped subset of the elements of this Chunk.

Returns a filtered, mapped subset of the elements of this Chunk.

Attributes

Definition Classes
override def copyToArray[B >: A](dest: Array[B], destPos: Int, length: Int): Int

Attributes

Definition Classes
final override def flatMap[B](f: A => IterableOnce[B]): Chunk[B]

Returns the concatenation of mapping every element into a new chunk using the specified function.

Returns the concatenation of mapping every element into a new chunk using the specified function.

Attributes

Definition Classes
override def flatten[B](implicit ev: A => IterableOnce[B]): Chunk[B]

Flattens a chunk of chunks into a single chunk by concatenating all chunks.

Flattens a chunk of chunks into a single chunk by concatenating all chunks.

Attributes

Definition Classes
final override def map[B](f: A => B): Chunk[B]

Returns a chunk with the elements mapped by the specified function.

Returns a chunk with the elements mapped by the specified function.

Attributes

Definition Classes
final override def prepended[A1 >: A](a1: A1): Chunk[A1]

Attributes

Definition Classes
final override def updated[A1 >: A](index: Int, elem: A1): Chunk[A1]

Attributes

Definition Classes
final override def zipWithIndex: Chunk[(A, Int)]

Zips this chunk with the index of every element.

Zips this chunk with the index of every element.

Attributes

Definition Classes

Inherited methods

final def ++[B >: A](suffix: IterableOnce[B]): CC[B]

Attributes

Inherited from:
IterableOps
final override def ++:[B >: A](prefix: IterableOnce[B]): CC[B]

Attributes

Definition Classes
Inherited from:
SeqOps
final def +:[B >: A](elem: B): CC[B]

Attributes

Inherited from:
SeqOps
final def :+[B >: A](elem: B): CC[B]

Attributes

Inherited from:
SeqOps
final def :++[B >: A](suffix: IterableOnce[B]): CC[B]

Attributes

Inherited from:
SeqOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
PartialFunction
override def andThen[C](k: A => C): PartialFunction[A, C]

Attributes

Definition Classes
Inherited from:
PartialFunction
override def appendedAll[B >: A](suffix: IterableOnce[B]): CC[B]

Attributes

Definition Classes
Inherited from:
StrictOptimizedSeqOps
def apply(i: Int): A

Attributes

Inherited from:
SeqOps
def applyOrElse[A1 <: Int, B1 >: A](x: A1, default: A1 => B1): B1

Attributes

Inherited from:
PartialFunction
override def canEqual(that: Any): Boolean

Attributes

Definition Classes
Inherited from:
IndexedSeq

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
SeqOps

Attributes

Inherited from:
PartialFunction
def compose[A](g: A => Int): A => R

Attributes

Inherited from:
Function1
final override def concat[B >: A](suffix: IterableOnce[B]): CC[B]

Attributes

Definition Classes
Inherited from:
SeqOps
def contains[A1 >: A](elem: A1): Boolean

Attributes

Inherited from:
SeqOps
def containsSlice[B >: A](that: Seq[B]): Boolean

Attributes

Inherited from:
SeqOps
def copyToArray[B >: A](xs: Array[B], start: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: A](xs: Array[B]): Int

Attributes

Inherited from:
IterableOnceOps
def corresponds[B](that: IterableOnce[B])(p: (A, B) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def corresponds[B](that: Seq[B])(p: (A, B) => Boolean): Boolean

Attributes

Inherited from:
SeqOps
def count(p: A => Boolean): Int

Attributes

Inherited from:
IterableOnceOps
override def diff[B >: A](that: Seq[B]): C

Attributes

Definition Classes
Inherited from:
StrictOptimizedSeqOps
def distinct: C

Attributes

Inherited from:
SeqOps
override def distinctBy[B](f: A => B): C

Attributes

Definition Classes
Inherited from:
StrictOptimizedSeqOps
override def drop(n: Int): C

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
override def dropRight(n: Int): C

Attributes

Definition Classes
Inherited from:
StrictOptimizedIterableOps
def dropWhile(p: A => Boolean): C

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
PartialFunction
override def empty: CC[A]

Attributes

Definition Classes
Inherited from:
IterableFactoryDefaults
def endsWith[B >: A](that: Iterable[B]): Boolean

Attributes

Inherited from:
SeqOps
override def equals(o: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Attributes

that

the object to compare against this object for equality.

Returns:

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Seq -> Equals -> Any
Inherited from:
Seq
def exists(p: A => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
override def filter(pred: A => Boolean): C
override def filterNot(pred: A => Boolean): C
def find(p: A => Boolean): Option[A]

Attributes

Inherited from:
IterableOnceOps
def findLast(p: A => Boolean): Option[A]

Attributes

Inherited from:
SeqOps
def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1

Attributes

Inherited from:
IterableOnceOps
def foldLeft[B](z: B)(op: (B, A) => B): B

Attributes

Inherited from:
IterableOnceOps
override def foldRight[B](z: B)(op: (A, B) => B): B

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
def forall(p: A => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def foreach[U](f: A => U): Unit

Attributes

Inherited from:
IterableOnceOps
protected def fromSpecific(coll: IterableOnce[A]): CC[A]

Attributes

Inherited from:
IterableFactoryDefaults
def groupBy[K](f: A => K): Map[K, C]

Attributes

Inherited from:
IterableOps
def groupMap[K, B](key: A => K)(f: A => B): Map[K, CC[B]]

Attributes

Inherited from:
IterableOps
def groupMapReduce[K, B](key: A => K)(f: A => B)(reduce: (B, B) => B): Map[K, B]

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
override def hashCode(): Int

Calculate a hash code value for the object.

Calculate a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Attributes

Returns:

the hash code value for this object.

Definition Classes
Seq -> Any
Inherited from:
Seq
override def head: A

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
override def headOption: Option[A]

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
def indexOf[B >: A](elem: B): Int

Attributes

Inherited from:
SeqOps
def indexOf[B >: A](elem: B, from: Int): Int

Attributes

Inherited from:
SeqOps
def indexOfSlice[B >: A](that: Seq[B]): Int

Attributes

Inherited from:
SeqOps
def indexOfSlice[B >: A](that: Seq[B], from: Int): Int

Attributes

Inherited from:
SeqOps
def indexWhere(p: A => Boolean): Int

Attributes

Inherited from:
SeqOps
def indexWhere(p: A => Boolean, from: Int): Int

Attributes

Inherited from:
SeqOps

Attributes

Inherited from:
SeqOps
def init: C

Attributes

Inherited from:
IterableOps
def inits: Iterator[C]

Attributes

Inherited from:
IterableOps
override def intersect[B >: A](that: Seq[B]): C

Attributes

Definition Classes
Inherited from:
StrictOptimizedSeqOps

Attributes

Inherited from:
SeqOps
override def isEmpty: Boolean

Attributes

Definition Classes
Inherited from:
SeqOps

Attributes

Definition Classes
Inherited from:
IterableOps

Attributes

Inherited from:
IndexedSeqOps
override def knownSize: Int

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
override def last: A

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
def lastIndexOf[B >: A](elem: B, end: Int): Int

Attributes

Inherited from:
SeqOps
def lastIndexOfSlice[B >: A](that: Seq[B]): Int

Attributes

Inherited from:
SeqOps
def lastIndexOfSlice[B >: A](that: Seq[B], end: Int): Int

Attributes

Inherited from:
SeqOps

Attributes

Inherited from:
SeqOps

Attributes

Inherited from:
SeqOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
Iterable
def length: Int

Attributes

Inherited from:
SeqOps
final override def lengthCompare(that: Iterable[_]): Int

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
final override def lengthCompare(len: Int): Int

Attributes

Definition Classes
Inherited from:
IndexedSeqOps

Attributes

Inherited from:
SeqOps
def lift: A => Option[B]

Attributes

Inherited from:
PartialFunction
def max[B >: A](implicit ord: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def maxBy[B](f: A => B)(implicit cmp: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def maxByOption[B](f: A => B)(implicit cmp: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
def maxOption[B >: A](implicit ord: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
def min[B >: A](implicit ord: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def minBy[B](f: A => B)(implicit cmp: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def minByOption[B](f: A => B)(implicit cmp: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
def minOption[B >: A](implicit ord: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
final def mkString: String

Attributes

Inherited from:
IterableOnceOps
final def mkString(sep: String): String

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps
protected def newSpecificBuilder: Builder[A, CC[A]]

Attributes

Inherited from:
IterableFactoryDefaults

Attributes

Inherited from:
IterableOnceOps
def orElse[A1 <: Int, B1 >: A](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]

Attributes

Inherited from:
PartialFunction
override def padTo[B >: A](len: Int, elem: B): CC[B]

Attributes

Definition Classes
Inherited from:
StrictOptimizedSeqOps
override def partition(p: A => Boolean): (C, C)

Attributes

Definition Classes
Inherited from:
StrictOptimizedIterableOps
override def partitionMap[A1, A2](f: A => Either[A1, A2]): (CC[A1], CC[A2])

Attributes

Definition Classes
Inherited from:
StrictOptimizedIterableOps
override def patch[B >: A](from: Int, other: IterableOnce[B], replaced: Int): CC[B]

Attributes

Definition Classes
Inherited from:
StrictOptimizedSeqOps

Attributes

Inherited from:
SeqOps
override def prependedAll[B >: A](prefix: IterableOnce[B]): CC[B]

Attributes

Definition Classes
Inherited from:
StrictOptimizedSeqOps
def product[B >: A](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def reduce[B >: A](op: (B, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeft[B >: A](op: (B, A) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeftOption[B >: A](op: (B, A) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceOption[B >: A](op: (B, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceRight[B >: A](op: (A, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceRightOption[B >: A](op: (A, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
override def reverse: C

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
override def reverseIterator: Iterator[A]

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
override protected def reversed: Iterable[A]

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
def runWith[U](action: A => U): A => Boolean

Attributes

Inherited from:
PartialFunction
override def sameElements[B >: A](o: IterableOnce[B]): Boolean

Attributes

Definition Classes
Inherited from:
IndexedSeq

Attributes

Inherited from:
SeqOps
def scan[B >: A](z: B)(op: (B, B) => B): CC[B]

Attributes

Inherited from:
IterableOps
override def scanLeft[B](z: B)(op: (B, A) => B): CC[B]
def scanRight[B](z: B)(op: (A, B) => B): CC[B]

Attributes

Inherited from:
IterableOps
override def search[B >: A](elem: B, from: Int, to: Int)(implicit ord: Ordering[B]): SearchResult

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
override def search[B >: A](elem: B)(implicit ord: Ordering[B]): SearchResult

Attributes

Definition Classes
Inherited from:
IndexedSeqOps

Attributes

Inherited from:
SeqOps
final def segmentLength(p: A => Boolean): Int

Attributes

Inherited from:
SeqOps
final override def size: Int

Attributes

Definition Classes
Inherited from:
SeqOps
final override def sizeCompare(that: Iterable[_]): Int

Attributes

Definition Classes
Inherited from:
SeqOps
final override def sizeCompare(otherSize: Int): Int

Attributes

Definition Classes
Inherited from:
SeqOps

Attributes

Inherited from:
IterableOps
override def slice(from: Int, until: Int): C

Attributes

Definition Classes
Inherited from:
IndexedSeqOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
def sortBy[B](f: A => B)(implicit ord: Ordering[B]): C

Attributes

Inherited from:
SeqOps
def sortWith(lt: (A, A) => Boolean): C

Attributes

Inherited from:
SeqOps
override def sorted[B >: A](implicit ord: Ordering[B]): C

Attributes

Definition Classes
Inherited from:
StrictOptimizedSeqOps
override def span(p: A => Boolean): (C, C)
override def splitAt(n: Int): (C, C)

Attributes

Definition Classes
Inherited from:
IterableOps

Attributes

Inherited from:
SeqOps
override def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S & EfficientSplit

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
def sum[B >: A](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def tail: C

Attributes

Inherited from:
IterableOps
def tails: Iterator[C]

Attributes

Inherited from:
IterableOps
override def take(n: Int): C

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
override def takeRight(n: Int): C

Attributes

Definition Classes
Inherited from:
StrictOptimizedIterableOps
def takeWhile(p: A => Boolean): C

Attributes

Inherited from:
IterableOps
override def tapEach[U](f: A => U): C
def to[C1](factory: Factory[A, C1]): C1

Attributes

Inherited from:
IterableOnceOps
def toArray[B >: A : ClassTag]: Array[B]

Attributes

Inherited from:
IterableOnceOps
final def toBuffer[B >: A]: Buffer[B]

Attributes

Inherited from:
IterableOnceOps
final override def toIndexedSeq: IndexedSeq[A]

Attributes

Definition Classes
Inherited from:
IndexedSeq
def toList: List[A]

Attributes

Inherited from:
IterableOnceOps
def toMap[K, V](implicit ev: A <:< (K, V)): Map[K, V]

Attributes

Inherited from:
IterableOnceOps
final override def toSeq: Seq.this.type

Attributes

Definition Classes
Inherited from:
Seq
def toSet[B >: A]: Set[B]

Attributes

Inherited from:
IterableOnceOps
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Seq -> Function1 -> Iterable -> Any
Inherited from:
Seq

Attributes

Inherited from:
IterableOnceOps
def transpose[B](implicit asIterable: A => Iterable[B]): CC[CC[B]]

Attributes

Inherited from:
IterableOps
def unapply(a: Int): Option[B]

Attributes

Inherited from:
PartialFunction
override def unzip[A1, A2](implicit asPair: A => (A1, A2)): (CC[A1], CC[A2])

Attributes

Definition Classes
Inherited from:
StrictOptimizedIterableOps
override def unzip3[A1, A2, A3](implicit asTriple: A => (A1, A2, A3)): (CC[A1], CC[A2], CC[A3])

Attributes

Definition Classes
Inherited from:
StrictOptimizedIterableOps
override def view: IndexedSeqView[A]

Attributes

Definition Classes
Inherited from:
IndexedSeqOps
def withFilter(p: A => Boolean): WithFilter[A, CC]

Attributes

Inherited from:
IterableOps
override def zip[B](that: IterableOnce[B]): CC[(A, B)]

Attributes

Definition Classes
Inherited from:
StrictOptimizedIterableOps
def zipAll[A1 >: A, B](that: Iterable[B], thisElem: A1, thatElem: B): CC[(A1, B)]

Attributes

Inherited from:
IterableOps

Deprecated and Inherited methods

final def /:[B](z: B)(op: (B, A) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldLeft instead of /:
Inherited from:
IterableOnceOps
final def :\[B](z: B)(op: (A, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldRight instead of :\\
Inherited from:
IterableOnceOps
def aggregate[B](z: => B)(seqop: (B, A) => B, combop: (B, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] `aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.
Inherited from:
IterableOnceOps

Attributes

Deprecated
[Since version 2.13.0] Use iterableFactory instead
Inherited from:
IterableOps
final def copyToBuffer[B >: A](dest: Buffer[B]): Unit

Attributes

Deprecated
[Since version 2.13.0] Use `dest ++= coll` instead
Inherited from:
IterableOnceOps

Attributes

Deprecated
[Since version 2.13.0] Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)
Inherited from:
IterableOnceOps
final def prefixLength(p: A => Boolean): Int

Attributes

Deprecated
[Since version 2.13.0] Use segmentLength instead of prefixLength
Inherited from:
SeqOps
final def repr: C

Attributes

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
def reverseMap[B](f: A => B): CC[B]

Attributes

Deprecated
[Since version 2.13.0] Use .reverseIterator.map(f).to(...) instead of .reverseMap(f)
Inherited from:
SeqOps
def seq: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.0] Iterable.seq always returns the iterable itself
Inherited from:
Iterable
final def toIterable: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.7] toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
Iterable
final def toIterator: Iterator[A]

Attributes

Deprecated
[Since version 2.13.0] Use .iterator instead of .toIterator
Inherited from:
IterableOnceOps
final def toStream: Stream[A]

Attributes

Deprecated
[Since version 2.13.0] Use .to(LazyList) instead of .toStream
Inherited from:
IterableOnceOps
final def toTraversable: Iterable[A]

Attributes

Deprecated
[Since version 2.13.0] toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
IterableOps
final def union[B >: A](that: Seq[B]): CC[B]

Attributes

Deprecated
[Since version 2.13.0] Use `concat` instead
Inherited from:
SeqOps
override def view(from: Int, until: Int): IndexedSeqView[A]

Attributes

Deprecated
[Since version 2.13.0] Use .view.slice(from, until) instead of .view(from, until)
Definition Classes
Inherited from:
IndexedSeqOps

Concrete fields

Returns a SeqFactory that can construct Chunk values. The SeqFactory exposes a newBuilder method that is not referentially transparent because it allocates mutable state.

Returns a SeqFactory that can construct Chunk values. The SeqFactory exposes a newBuilder method that is not referentially transparent because it allocates mutable state.

Attributes