final class NonEmptyChunk[+A] extends NonEmptySeq[A, NonEmptyChunk, Chunk] with Serializable
A NonEmptyChunk
is a Chunk
that is guaranteed to contain at least one
element. As a result, operations which would not be safe when performed on
Chunk
, such as head
or reduce
, are safe when performed on
NonEmptyChunk
. Operations on NonEmptyChunk
which could potentially return
an empty chunk will return a Chunk
instead.
- Self Type
- NonEmptyChunk[A]
- Alphabetic
- By Inheritance
- NonEmptyChunk
- Serializable
- NonEmptySeq
- NonEmptyOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ++[A1 >: A](that: Chunk[A1]): NonEmptyChunk[A1]
Appends the specified
Chunk
to the end of thisNonEmptyChunk
. - def +:[A1 >: A](a: A1): NonEmptyChunk[A1]
A symbolic alias for
prepended
. - def :+[A1 >: A](a: A1): NonEmptyChunk[A1]
A symbolic alias for
appended
. - final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def append[A1 >: A](that: Chunk[A1]): NonEmptyChunk[A1]
A named alias for
++
. - def appended[A1 >: A](a: A1): NonEmptyChunk[A1]
Appends a single element to the end of this
NonEmptyChunk
.Appends a single element to the end of this
NonEmptyChunk
.- Definition Classes
- NonEmptyChunk → NonEmptySeq
- def asBits(implicit ev: <:<[A, Byte]): NonEmptyChunk[Boolean]
Converts this
NonEmptyChunk
of bytes to aNonEmptyChunk
of bits. - def asBitsInt(endianness: Endianness)(implicit ev: <:<[A, Int]): NonEmptyChunk[Boolean]
Converts this
NonEmptyChunk
of ints to aNonEmptyChunk
of bits. - def asBitsLong(endianness: Endianness)(implicit ev: <:<[A, Long]): NonEmptyChunk[Boolean]
Converts this
NonEmptyChunk
of longs to aNonEmptyChunk
of bits. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def collect[B](pf: PartialFunction[A, B]): Chunk[B]
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def collectFirst[B](pf: PartialFunction[A, B]): Option[B]
- Definition Classes
- NonEmptyChunk → NonEmptySeq
- def distinct: NonEmptyChunk[A]
- Definition Classes
- NonEmptyChunk → NonEmptySeq
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(that: Any): Boolean
Returns whether this
NonEmptyChunk
and the specifiedNonEmptyChunk
are equal to each other.Returns whether this
NonEmptyChunk
and the specifiedNonEmptyChunk
are equal to each other.- Definition Classes
- NonEmptyChunk → AnyRef → Any
- def exists(p: (A) => Boolean): Boolean
Determines whether a predicate is satisfied for at least one element of this
NonEmptyChunk
.Determines whether a predicate is satisfied for at least one element of this
NonEmptyChunk
.- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def filter(p: (A) => Boolean): Chunk[A]
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def filterNot(p: (A) => Boolean): Chunk[A]
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def find(p: (A) => Boolean): Option[A]
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def flatMap[B](f: (A) => NonEmptyChunk[B]): NonEmptyChunk[B]
Maps each element of this
NonEmptyChunk
to a newNonEmptyChunk
and then concatenates them together. - def flatten[B](implicit ev: <:<[A, NonEmptyChunk[B]]): NonEmptyChunk[B]
Flattens a
NonEmptyChunk
ofNonEmptyChunk
values to a singleNonEmptyChunk
. - def foldLeft[B](z: B)(op: (B, A) => B): B
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def forall(p: (A) => Boolean): Boolean
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def groupBy[K](f: (A) => K): Map[K, NonEmptyChunk[A]]
Groups the values in this
NonEmptyChunk
using the specified function. - def groupMap[K, V](key: (A) => K)(f: (A) => V): Map[K, NonEmptyChunk[V]]
Groups and transformers the values in this
NonEmptyChunk
using the specified function. - def grouped(size: Int): Iterator[NonEmptyChunk[A]]
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def hashCode(): Int
Returns the hashcode of this
NonEmptyChunk
.Returns the hashcode of this
NonEmptyChunk
.- Definition Classes
- NonEmptyChunk → AnyRef → Any
- def head: A
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def init: Chunk[A]
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def iterator: Iterator[A]
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def last: A
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def map[B](f: (A) => B): NonEmptyChunk[B]
Transforms the elements of this
NonEmptyChunk
with the specified function.Transforms the elements of this
NonEmptyChunk
with the specified function.- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def mapAccum[S, B](s: S)(f: (S, A) => (S, B)): (S, NonEmptyChunk[B])
Maps over the elements of this
NonEmptyChunk
, maintaining some state along the way. - def mapAccumZIO[R, E, S, B](s: S)(f: (S, A) => ZIO[R, E, (S, B)])(implicit trace: Trace): ZIO[R, E, (S, NonEmptyChunk[B])]
Effectfully maps over the elements of this
NonEmptyChunk
, maintaining some state along the way. - def mapZIO[R, E, B](f: (A) => ZIO[R, E, B])(implicit trace: Trace): ZIO[R, E, NonEmptyChunk[B]]
Effectfully maps the elements of this
NonEmptyChunk
. - def mapZIOPar[R, E, B](f: (A) => ZIO[R, E, B])(implicit trace: Trace): ZIO[R, E, NonEmptyChunk[B]]
Effectfully maps the elements of this
NonEmptyChunk
in parallel. - def materialize[A1 >: A]: NonEmptyChunk[A1]
Materialize the elements of this
NonEmptyChunk
into aNonEmptyChunk
backed by an array. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def prepend[A1 >: A](that: Chunk[A1]): NonEmptyChunk[A1]
Prepends the specified
Chunk
to the beginning of thisNonEmptyChunk
. - def prepended[A1 >: A](a: A1): NonEmptyChunk[A1]
Prepends a single element to the beginning of this
NonEmptyChunk
.Prepends a single element to the beginning of this
NonEmptyChunk
.- Definition Classes
- NonEmptyChunk → NonEmptySeq
- def reduce[B >: A](op: (B, B) => B): B
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def reduceMapLeft[B](map: (A) => B)(reduce: (B, A) => B): B
Reduces the elements of this
NonEmptyChunk
from left to right using the functionmap
to transform the first value to the typeB
and then the functionreduce
to combine theB
value with each otherA
value. - def reduceMapRight[B](map: (A) => B)(reduce: (A, B) => B): B
Reduces the elements of this
NonEmptyChunk
from right to left using the functionmap
to transform the first value to the typeB
and then the functionreduce
to combine theB
value with each otherA
value. - def reverse: NonEmptyChunk[A]
- Definition Classes
- NonEmptyChunk → NonEmptySeq
- def size: Int
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def sortBy[B](f: (A) => B)(implicit ord: Ordering[B]): NonEmptyChunk[A]
- Definition Classes
- NonEmptyChunk → NonEmptySeq
- def sorted[B >: A](implicit ord: Ordering[B]): NonEmptyChunk[B]
- Definition Classes
- NonEmptyChunk → NonEmptySeq
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tail: Chunk[A]
- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
Converts this
NonEmptyChunk
to an array.Converts this
NonEmptyChunk
to an array.- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def toChunk: Chunk[A]
Converts this
NonEmptyChunk
to aChunk
, discarding information about it not being empty. - def toCons[A1 >: A]: ::[A1]
Converts this
NonEmptyChunk
to the::
case of aList
. - def toIterable: Iterable[A]
Converts this
NonEmptyChunk
to anIterable
.Converts this
NonEmptyChunk
to anIterable
.- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def toList: List[A]
Converts this
NonEmptyChunk
to aList
.Converts this
NonEmptyChunk
to aList
.- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def toString(): String
Renders this
NonEmptyChunk
as aString
.Renders this
NonEmptyChunk
as aString
.- Definition Classes
- NonEmptyChunk → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def zip[B](that: NonEmptyChunk[B])(implicit zippable: Zippable[A, B]): NonEmptyChunk[Out]
Zips this
NonEmptyChunk
with the specifiedNonEmptyChunk
, only keeping as many elements as are in the smaller chunk.Zips this
NonEmptyChunk
with the specifiedNonEmptyChunk
, only keeping as many elements as are in the smaller chunk.- Definition Classes
- NonEmptyChunk → NonEmptyOps
- def zipAll[B](that: Chunk[B]): NonEmptyChunk[(Option[A], Option[B])]
Zips this
NonEmptyChunk
with the specifiedChunk
, usingNone
to "fill in" missing values if one chunk has fewer elements than the other. - def zipAllWith[B, C](that: Chunk[B])(left: (A) => C, right: (B) => C)(both: (A, B) => C): NonEmptyChunk[C]
Zips this
NonEmptyChunk
with the specifiedChunk
, using the specified functions to "fill in" missing values if one chunk has fewer elements than the other. - def zipWith[B, C](that: NonEmptyChunk[B])(f: (A, B) => C): NonEmptyChunk[C]
Zips this
NonEmptyChunk
with the specifiedNonEmptyChunk
, only keeping as many elements as are in the smaller chunk. - def zipWithIndex: NonEmptyChunk[(A, Int)]
Annotates each element of this
NonEmptyChunk
with its index.Annotates each element of this
NonEmptyChunk
with its index.- Definition Classes
- NonEmptyChunk → NonEmptyOps
- final def zipWithIndexFrom(indexOffset: Int): NonEmptyChunk[(A, Int)]
Annotates each element of this
NonEmptyChunk
with its index, with the specified offset.