final class NonEmptyChunk[+A] extends AnyRef
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
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
Chunkto the end of thisNonEmptyChunk. -
def
:+[A1 >: A](a: A1): NonEmptyChunk[A1]
Apparents a single element to the end of this
NonEmptyChunk. -
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
append[A1 >: A](that: Chunk[A1]): NonEmptyChunk[A1]
A named alias for
++. -
def
asBits(implicit ev: <:<[A, Byte]): NonEmptyChunk[Boolean]
Converts this
NonEmptyChunkof bytes to aNonEmptyChunkof bits. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(that: Any): Boolean
Returns whether this
NonEmptyChunkand the specifiedNonEmptyChunkare equal to each other.Returns whether this
NonEmptyChunkand the specifiedNonEmptyChunkare equal to each other.- Definition Classes
- NonEmptyChunk → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap[B](f: (A) ⇒ NonEmptyChunk[B]): NonEmptyChunk[B]
Maps each element of this
NonEmptyChunkto a newNonEmptyChunkand then concatenates them together. -
def
flatten[B](implicit ev: <:<[A, NonEmptyChunk[B]]): NonEmptyChunk[B]
Flattens a
NonEmptyChunkofNonEmptyChunkvalues to a singleNonEmptyChunk. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
Returns the hashcode of this
NonEmptyChunk.Returns the hashcode of this
NonEmptyChunk.- Definition Classes
- NonEmptyChunk → AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[B](f: (A) ⇒ B): NonEmptyChunk[B]
Transforms the elements of this
NonEmptyChunkwith the specified function. -
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
mapAccumM[R, E, S, B](s: S)(f: (S, A) ⇒ ZIO[R, E, (S, B)]): ZIO[R, E, (S, NonEmptyChunk[B])]
Effectfully maps over the elements of this
NonEmptyChunk, maintaining some state along the way. -
def
mapM[R, E, B](f: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, NonEmptyChunk[B]]
Effectfully maps the elements of this
NonEmptyChunk. -
def
mapMPar[R, E, B](f: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, NonEmptyChunk[B]]
Effectfully maps the elements of this
NonEmptyChunkin parallel. -
def
materialize[A1 >: A]: NonEmptyChunk[A1]
Materialize the elements of this
NonEmptyChunkinto aNonEmptyChunkbacked 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
Chunkto the beginning of thisNonEmptyChunk. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toChunk: Chunk[A]
Converts this
NonEmptyChunkto aChunk, discarding information about it not being empty. -
def
toCons[A1 >: A]: ::[A1]
Converts this
NonEmptyChunkto the::case of aList. -
def
toString(): String
Renders this
NonEmptyChunkas aString.Renders this
NonEmptyChunkas aString.- Definition Classes
- NonEmptyChunk → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
zipAllWith[B, C](that: Chunk[B])(left: (A) ⇒ C, right: (B) ⇒ C)(both: (A, B) ⇒ C): NonEmptyChunk[C]
Zips this
NonEmptyChunkwith the specifiedChunk, using the specified functions to "fill in" missing values if one chunk has fewer elements than the other. -
final
def
zipWith[B, C](that: NonEmptyChunk[B])(f: (A, B) ⇒ C): NonEmptyChunk[C]
Zips this
NonEmptyCHunkwith the specifiedNonEmptyChunk, only keeping as many elements as are in the smaller chunk. -
def
zipWithIndex: NonEmptyChunk[(A, Int)]
Annotates each element of this
NonEmptyChunkwith its index. -
final
def
zipWithIndexFrom(indexOffset: Int): NonEmptyChunk[(A, Int)]
Annotates each element of this
NonEmptyChunkwith its index, with the specified offset.