Buffer
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]
class CharBuffer
class ByteBuffer
Value members
Methods
Inherited methods
Drops the right-most
n
elements of this chunk queue in a way that preserves chunk structure.- Inhertied from
- Chunk
Maps the supplied function over each element and returns a chunk of just the defined results.
- Inhertied from
- Chunk
Takes the right-most
n
elements of this chunk queue in a way that preserves chunk structure.- Inhertied from
- Chunk
Zips the elements of the input chunk with its indices, and returns the new chunk.
- Example
- {{{
scala> Chunk("The", "quick", "brown", "fox").zipWithIndex.toList
res0: List[(String, Int)] = List((The,0), (quick,1), (brown,2), (fox,3))
}}} - Inhertied from
- Chunk
Returns the index of the first element which passes the specified predicate (i.e.,
or
p(i) == true
)or
None
if no elements pass the predicate.- Inhertied from
- Chunk
Maps the supplied stateful function over each element, outputting the final state and the accumulated outputs.
The first invocation of
the output state of the previous invocation.
The first invocation of
f
uses init
as the input state value. Each successive invocation usesthe output state of the previous invocation.
- Inhertied from
- Chunk
Returns a chunk which consists of the elements of this chunk and the elements of
the supplied chunk. This operation is amortized O(1).
the supplied chunk. This operation is amortized O(1).
- Inhertied from
- Chunk
Returns the first element for which the predicate returns true or
None
if no elements satisfy the predicate.- Inhertied from
- Chunk
Creates an iterator that iterates the elements of this chunk in reverse order. The returned iterator is not thread safe.
- Inhertied from
- Chunk
Check to see if this starts with the items in the given seq
should be the same as take(seq.size).toChunk == Chunk.seq(seq).
should be the same as take(seq.size).toChunk == Chunk.seq(seq).
- Inhertied from
- Chunk
def traverseFilter[F <: ([_$9] =>> Any), O2](f: O => F[Option[O2]])(F: Applicative[F]): F[Chunk[O2]]
- Inhertied from
- Chunk
Creates an iterator that iterates the elements of this chunk. The returned iterator is not thread safe.
- Inhertied from
- Chunk
Zips this chunk with the supplied chunk, passing each pair to
an output chunk.
f
, resulting inan output chunk.
- Inhertied from
- Chunk
Like
the last element of the accumulated chunk.
scanLeft
except the final element is emitted as a standalone value instead of asthe last element of the accumulated chunk.
Equivalent to
val b = a.scanLeft(z)(f); val (c, carry) = b.splitAt(b.size - 1)
.- Inhertied from
- Chunk