Packages

sealed trait Chunk[+A] extends AnyRef

A Chunk[A] represents a chunk of values of type A. Chunks are designed are usually backed by arrays, but expose a purely functional, safe interface to the underlying elements, and they become lazy on operations that would be costly with arrays, such as repeated concatenation.

Self Type
Chunk[A]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Chunk
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(n: Int): A
    Attributes
    protected[zio]
  2. abstract def foreach(f: (A) ⇒ Unit): Unit
    Attributes
    protected[zio]
  3. abstract val length: Int

    The number of elements in the chunk.

  4. abstract def toArray[A1 >: A](n: Int, dest: Array[A1]): Unit
    Attributes
    protected[zio]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def +[A1 >: A](a: A1): Chunk[A1]

    Appends an element to the chunk

  4. final def ++[A1 >: A](that: Chunk[A1]): Chunk[A1]

    Returns the concatenation of this chunk with the specified chunk.

  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def collect[B](pf: PartialFunction[A, B]): Chunk[B]

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

  9. def collectM[R, E, B](pf: PartialFunction[A, ZIO[R, E, B]]): ZIO[R, E, Chunk[B]]

    Returns a filtered, mapped subset of the elements of this chunk based on a .

  10. def collectWhile[B](pf: PartialFunction[A, B]): Chunk[B]

    Transforms all elements of the chunk for as long as the specified partial function is defined.

  11. def collectWhileM[R, E, B](pf: PartialFunction[A, ZIO[R, E, B]]): ZIO[R, E, Chunk[B]]
  12. final def drop(n: Int): Chunk[A]

    Drops the first n elements of the chunk.

  13. def dropWhile(f: (A) ⇒ Boolean): Chunk[A]

    Drops all elements so long as the predicate returns true.

  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(that: Any): Boolean
    Definition Classes
    Chunk → AnyRef → Any
  16. def exists(f: (A) ⇒ Boolean): Boolean

    Determines whether a predicate is satisfied for at least one element of this chunk.

  17. def filter(f: (A) ⇒ Boolean): Chunk[A]

    Returns a filtered subset of this chunk.

  18. final def filterM[R, E](f: (A) ⇒ ZIO[R, E, Boolean]): ZIO[R, E, Chunk[A]]

    Filters this chunk by the specified effectful predicate, retaining all elements for which the predicate evaluates to true.

  19. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def find(f: (A) ⇒ Boolean): Option[A]

    Returns the first element that satisfies the predicate.

  21. def flatMap[B](f: (A) ⇒ Chunk[B]): Chunk[B]

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

  22. def flatten[B](implicit ev: <:<[A, Chunk[B]]): Chunk[B]

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

  23. def fold[S](s0: S)(f: (S, A) ⇒ S): S

    Folds over the elements in this chunk from the left.

  24. final def foldM[R, E, S](s: S)(f: (S, A) ⇒ ZIO[R, E, S]): ZIO[R, E, S]

    Effectfully folds over the elements in this chunk from the left.

  25. def foldRight[S](s0: S)(f: (A, S) ⇒ S): S

    Folds over the elements in this chunk from the right.

  26. final def foldWhile[S](s0: S)(pred: (S) ⇒ Boolean)(f: (S, A) ⇒ S): S

    Folds over the elements in this chunk from the left.

    Folds over the elements in this chunk from the left. Stops the fold early when the condition is not fulfilled.

  27. final def foldWhileM[R, E, S](z: S)(pred: (S) ⇒ Boolean)(f: (S, A) ⇒ ZIO[R, E, S]): ZIO[R, E, S]
  28. def forall(f: (A) ⇒ Boolean): Boolean

    Determines whether a predicate is satisfied for all elements of this chunk.

  29. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. final def hashCode(): Int
    Definition Classes
    Chunk → AnyRef → Any
  31. def headOption: Option[A]

    Returns the first element of this chunk if it exists.

  32. def indexWhere(f: (A) ⇒ Boolean, from: Int): Option[Int]

    Returns the first index for which the given predicate is satisfied after or at some given index.

  33. def indexWhere(f: (A) ⇒ Boolean): Option[Int]

    Returns the first index for which the given predicate is satisfied.

  34. final def isEmpty: Boolean

    Determines if the chunk is empty.

  35. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  36. def lastOption: Option[A]

    Returns the last element of this chunk if it exists.

  37. def map[B](f: (A) ⇒ B): Chunk[B]

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

  38. final def mapAccum[S1, B](s1: S1)(f1: (S1, A) ⇒ (S1, B)): (S1, Chunk[B])

    Statefully maps over the chunk, producing new elements of type B.

  39. final def mapAccumM[R, E, S1, B](s1: S1)(f1: (S1, A) ⇒ ZIO[R, E, (S1, B)]): ZIO[R, E, (S1, Chunk[B])]

    Statefully and effectfully maps over the elements of this chunk to produce new elements.

  40. final def mapM[R, E, B](f: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, Chunk[B]]

    Effectfully maps the elements of this chunk.

  41. final def mapMPar[R, E, B](f: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, Chunk[B]]

    Effectfully maps the elements of this chunk in parallel.

  42. final def mapMPar_[R, E](f: (A) ⇒ ZIO[R, E, Any]): ZIO[R, E, Unit]

    Effectfully maps the elements of this chunk in parallel purely for the effects.

  43. final def mapM_[R, E](f: (A) ⇒ ZIO[R, E, Any]): ZIO[R, E, Unit]

    Effectfully maps the elements of this chunk purely for the effects.

  44. def materialize[A1 >: A]: Chunk[A1]

    Materializes a chunk into a chunk backed by an array.

    Materializes a chunk into a chunk backed by an array. This method can improve the performance of bulk operations.

  45. final def mkString: String

    Generates a readable string representation of this chunk.

  46. final def mkString(sep: String): String

    Generates a readable string representation of this chunk using the specified separator string.

  47. final def mkString(start: String, sep: String, end: String): String

    Generates a readable string representation of this chunk using the specified start, separator, and end strings.

  48. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  49. final def nonEmpty: Boolean

    Determines if the chunk is not empty.

  50. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  51. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  52. final def size: Int

    The number of elements in the chunk.

  53. final def splitAt(n: Int): (Chunk[A], Chunk[A])

    Returns two splits of this chunk at the specified index.

  54. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  55. final def take(n: Int): Chunk[A]

    Takes the first n elements of the chunk.

  56. def takeWhile(f: (A) ⇒ Boolean): Chunk[A]

    Takes all elements so long as the predicate returns true.

  57. def toArray[A1 >: A](implicit tag: ClassTag[A1]): Array[A1]

    Converts the chunk into an array.

  58. def toList: List[A]
  59. def toSeq: Seq[A]
  60. def toString(): String
    Definition Classes
    Chunk → AnyRef → Any
  61. def toVector: Vector[A]
  62. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  65. def zipAllWith[B, C](that: Chunk[B])(left: (A) ⇒ C, right: (B) ⇒ C)(both: (A, B) ⇒ C): Chunk[C]
  66. final def zipWith[B, C](that: Chunk[B])(f: (A, B) ⇒ C): Chunk[C]

    Zips this chunk with the specified chunk using the specified combiner.

  67. final def zipWithIndex: Chunk[(A, Int)]

    Zips this chunk with the index of every element.

  68. final def zipWithIndexFrom(indexOffset: Int): Chunk[(A, Int)]

    Zips this chunk with the index of every element, starting from the initial index value.

Inherited from AnyRef

Inherited from Any

Ungrouped