Trait/Object

zio

Chunk

Related Docs: object Chunk | package zio

Permalink

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

    Permalink
    Attributes
    protected[zio]
  2. abstract def foreach(f: (A) ⇒ Unit): Unit

    Permalink
    Attributes
    protected[zio]
  3. abstract val length: Int

    Permalink

    The number of elements in the chunk.

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

    Permalink
    Attributes
    protected[zio]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def +[A1 >: A](a: A1): Chunk[A1]

    Permalink

    Appends an element to the chunk

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

    Permalink

    Returns the concatenation of this chunk with the specified chunk.

  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def collect[B](pf: PartialFunction[A, B]): Chunk[B]

    Permalink

    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]]

    Permalink

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

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

    Permalink

    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]]

    Permalink
  12. final def drop(n: Int): Chunk[A]

    Permalink

    Drops the first n elements of the chunk.

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

    Permalink

    Drops all elements so long as the predicate returns true.

  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(that: Any): Boolean

    Permalink
    Definition Classes
    Chunk → AnyRef → Any
  16. def filter(f: (A) ⇒ Boolean): Chunk[A]

    Permalink

    Returns a filtered subset of this chunk.

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

    Permalink

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

  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def flatMap[B](f: (A) ⇒ Chunk[B]): Chunk[B]

    Permalink

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

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

    Permalink

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

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

    Permalink

    Folds over the elements in this chunk from the left.

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

    Permalink

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

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

    Permalink

    Folds over the elements in this chunk from the right.

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

    Permalink

    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.

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

    Permalink
  26. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  27. final def hashCode(): Int

    Permalink
    Definition Classes
    Chunk → AnyRef → Any
  28. final def isEmpty: Boolean

    Permalink

    Determines if the chunk is empty.

  29. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  30. def map[B](f: (A) ⇒ B): Chunk[B]

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

    Effectfully maps the elements of this chunk.

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

    Permalink

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

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

    Permalink

    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.

  36. final def mkString: String

    Permalink

    Generates a readable string representation of this chunk.

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

    Permalink

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

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

    Permalink

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

  39. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  40. final def nonEmpty: Boolean

    Permalink

    Determines if the chunk is not empty.

  41. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  42. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  43. final def size: Int

    Permalink

    The number of elements in the chunk.

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

    Permalink

    Returns two splits of this chunk at the specified index.

  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  46. final def take(n: Int): Chunk[A]

    Permalink

    Takes the first n elements of the chunk.

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

    Permalink

    Takes all elements so long as the predicate returns true.

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

    Permalink

    Converts the chunk into an array.

  49. def toList: List[A]

    Permalink
  50. def toSeq: Seq[A]

    Permalink
  51. def toString(): String

    Permalink
    Definition Classes
    Chunk → AnyRef → Any
  52. def toVector: Vector[A]

    Permalink
  53. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. def zipAllWith[B, C](that: Chunk[B])(left: (A) ⇒ C, right: (B) ⇒ C)(both: (A, B) ⇒ C): Chunk[C]

    Permalink
  57. final def zipWith[B, C](that: Chunk[B])(f: (A, B) ⇒ C): Chunk[C]

    Permalink

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

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

    Permalink

    Zips this chunk with the index of every element.

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

    Permalink

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

Deprecated Value Members

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

    Permalink

    Effectfully traverses the elements of this chunk.

    Effectfully traverses the elements of this chunk.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) use mapM

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

    Permalink

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

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

    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) use mapM_

Inherited from AnyRef

Inherited from Any

Ungrouped