Chunk

object Chunk extends CollectorK[[O] =>> Chunk[O]] with ChunkCompanionPlatform
Companion
class
trait ChunkCompanionPlatform
trait CollectorK[[O] =>> Chunk[O]]
class Object
trait Matchable
class Any

Type members

Classlikes

final class Singleton[O](val value: O) extends Chunk[O]
case class ArraySlice[O](values: Array[O], offset: Int, length: Int)(ct: ClassTag[O]) extends Chunk[O]
Companion
object
object ArraySlice
Companion
class
sealed abstract class Buffer[A <: Buffer[A, B, C], B <: Buffer, C](buf: B, val offset: Int, val size: Int)(evidence$4: ClassTag[C]) extends Chunk[C]
object CharBuffer
Companion
class
case class CharBuffer(buf: CharBuffer, offset: Int, size: Int) extends Buffer[CharBuffer, CharBuffer, Char]
Companion
object
object ByteBuffer
Companion
class
case class ByteBuffer extends Buffer[ByteBuffer, ByteBuffer, Byte]
Companion
object
final class Queue[+O] extends Chunk[O]
A FIFO queue of chunks that provides an O(1) size method and provides the ability to
take and drop individual elements while preserving the chunk structure as much as possible.
This is similar to a queue of individual elements but chunk structure is maintained.
Companion
object
object Queue
Companion
class

Inherited classlikes

case class IArraySlice[O](values: IArray[O], offset: Int, length: Int)(ct: ClassTag[O])
Inhertied from
ChunkCompanionPlatform

Value members

Methods

def empty[A]: Chunk[A]
Chunk with no elements.
def singleton[O](o: O): Chunk[O]
Creates a chunk consisting of a single element.
def vector[O](v: Vector[O]): Chunk[O]
Creates a chunk backed by a vector.
def indexedSeq[O](s: IndexedSeq[O]): Chunk[O]
Creates a chunk backed by an IndexedSeq.
def seq[O](s: Seq[O]): Chunk[O]
Creates a chunk from a scala.collection.Seq.
def iterable[O](i: Iterable[O]): Chunk[O]
Creates a chunk from a scala.collection.Iterable.
def arraySeq[O](arraySeq: ArraySeq[O]): Chunk[O]
Creates a chunk backed by a mutable ArraySeq.
def chain[O](c: Chain[O]): Chunk[O]
Creates a chunk backed by a Chain.
def buffer[O](b: Buffer[O]): Chunk[O]
Creates a chunk backed by a mutable buffer. The underlying buffer must not be modified after
it is passed to this function.
def apply[O](os: O*): Chunk[O]
Creates a chunk with the specified values.
def array[O](values: Array[O])(evidence$2: ClassTag[O]): Chunk[O]
Creates a chunk backed by an array.
def array[O](values: Array[O], offset: Int, length: Int)(evidence$3: ClassTag[O]): Chunk[O]
Creates a chunk backed by a slice of an array.
def charBuffer(buf: CharBuffer): Chunk[Char]
Creates a chunk backed by an char buffer, bounded by the current position and limit
def byteBuffer(buf: ByteBuffer): Chunk[Byte]
Creates a chunk backed by an byte buffer, bounded by the current position and limit
def byteVector(bv: ByteVector): Chunk[Byte]
Creates a chunk backed by a byte vector.
def concat[A](chunks: Seq[Chunk[A]])(evidence$5: ClassTag[A]): Chunk[A]
Concatenates the specified sequence of chunks in to a single chunk, avoiding boxing.
def concat[A](chunks: Seq[Chunk[A]], totalSize: Int)(evidence$6: ClassTag[A]): Chunk[A]
Concatenates the specified sequence of chunks in to a single chunk, avoiding boxing.
The totalSize parameter must be equal to the sum of the size of each chunk or
otherwise an exception may be thrown.
def queue[A](queue: Queue[A]): Chunk[A]
Creates a chunk consisting of the elements of queue.
def queueFirstN[A](queue: Queue[A], n: Int): (Chunk[A], Queue[A])
Creates a chunk consisting of the first n elements of queue and returns the remainder.
def newBuilder[O]: Builder[O, Chunk[O]]

Inherited methods

protected def platformIterable[O](i: Iterable[O]): Option[Chunk[O]]
Inhertied from
ChunkCompanionPlatform
def arraySeq[O](arraySeq: ArraySeq[O]): Chunk[O]
Creates a chunk backed by an immutable ArraySeq.
Inhertied from
ChunkCompanionPlatform
def iarray[O](arr: IArray[O], offset: Int, length: Int)(evidence$4: ClassTag[O]): Chunk[O]
Creates a chunk backed by a slice of an immutable array.
Inhertied from
ChunkCompanionPlatform
def iarray[O](arr: IArray[O])(evidence$3: ClassTag[O]): Chunk[O]
Creates a chunk backed by an immutable array.
Inhertied from
ChunkCompanionPlatform

Implicits

Implicits

implicit def eqInstance[A](A: Eq[A]): Eq[Chunk[A]]
implicit val instance: Traverse[[O] =>> Chunk[O]] & Monad[[O] =>> Chunk[O]] & Alternative[[O] =>> Chunk[O]] & TraverseFilter[[O] =>> Chunk[O]]
Traverse, Monad, Alternative, and TraverseFilter instance for Chunk.