sealed trait NonEmptyChunk[+A] extends Chunk[A]
- Alphabetic
- By Inheritance
- NonEmptyChunk
- Chunk
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
apply(i: Int): A
Gets the
i
-th element of this chunk, throwing anIndexOutOfBoundsException
if the index is not in the range[0,size)
.Gets the
i
-th element of this chunk, throwing anIndexOutOfBoundsException
if the index is not in the range[0,size)
.- Definition Classes
- Chunk
-
abstract
def
copyToArray[B >: A](xs: Array[B], start: Int = 0): Unit
Copies the elements of this chunk in to the specified array at the specified start index.
Copies the elements of this chunk in to the specified array at the specified start index.
- Definition Classes
- Chunk
-
abstract
def
drop(n: Int): Chunk[A]
Returns a new chunk made up of the elemenets of this chunk without the first
n
elements.Returns a new chunk made up of the elemenets of this chunk without the first
n
elements.- Definition Classes
- Chunk
-
abstract
def
filter(f: (A) ⇒ Boolean): Chunk[A]
Returns a new chunk made up of the elements of this chunk for which the specified predicate returns true.
Returns a new chunk made up of the elements of this chunk for which the specified predicate returns true.
- Definition Classes
- Chunk
-
abstract
def
foldLeft[B](z: B)(f: (B, A) ⇒ B): B
Reduces this chunk to a value of type
B
by applyingf
to each element, left to right, passing the output of each invocation off
to the next invocation off
and starting withz
.Reduces this chunk to a value of type
B
by applyingf
to each element, left to right, passing the output of each invocation off
to the next invocation off
and starting withz
.- Definition Classes
- Chunk
-
abstract
def
foldRight[B](z: B)(f: (A, B) ⇒ B): B
Reduces this chunk to a value of type
B
by applyingf
to each element, right to left, passing the output of each invocation off
to the next invocation off
and starting withz
.Reduces this chunk to a value of type
B
by applyingf
to each element, right to left, passing the output of each invocation off
to the next invocation off
and starting withz
.- Definition Classes
- Chunk
-
abstract
def
size: Int
Returns the number of elements in this chunk.
Returns the number of elements in this chunk.
- Definition Classes
- Chunk
-
abstract
def
take(n: Int): Chunk[A]
Returns a new chunk made up of the first
n
elemenets of this chunk.Returns a new chunk made up of the first
n
elemenets of this chunk.- Definition Classes
- Chunk
-
abstract
def
unconsNonEmpty: (A, Chunk[A])
Like uncons but returns the head and tail directly instead of being wrapped in an
Option
.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from NonEmptyChunk[A] to any2stringadd[NonEmptyChunk[A]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (NonEmptyChunk[A], B)
- Implicit
- This member is added by an implicit conversion from NonEmptyChunk[A] to ArrowAssoc[NonEmptyChunk[A]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
collect[B](pf: PartialFunction[A, B]): Chunk[B]
Maps and filters this chunk simultaneously using the supplied partial function.
Maps and filters this chunk simultaneously using the supplied partial function.
- Definition Classes
- Chunk
-
def
ensuring(cond: (NonEmptyChunk[A]) ⇒ Boolean, msg: ⇒ Any): NonEmptyChunk[A]
- Implicit
- This member is added by an implicit conversion from NonEmptyChunk[A] to Ensuring[NonEmptyChunk[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (NonEmptyChunk[A]) ⇒ Boolean): NonEmptyChunk[A]
- Implicit
- This member is added by an implicit conversion from NonEmptyChunk[A] to Ensuring[NonEmptyChunk[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): NonEmptyChunk[A]
- Implicit
- This member is added by an implicit conversion from NonEmptyChunk[A] to Ensuring[NonEmptyChunk[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): NonEmptyChunk[A]
- Implicit
- This member is added by an implicit conversion from NonEmptyChunk[A] to Ensuring[NonEmptyChunk[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(a: Any): Boolean
- Definition Classes
- Chunk → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from NonEmptyChunk[A] to StringFormat[NonEmptyChunk[A]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- Chunk → AnyRef → Any
-
def
head: A
Returns the first element in the chunk.
-
def
indexWhere(p: (A) ⇒ Boolean): Option[Int]
Returns the index of the first element for which
p
returns true.Returns the index of the first element for which
p
returns true.- Definition Classes
- Chunk
-
def
isEmpty: Boolean
Returns true if this chunk has no elements.
Returns true if this chunk has no elements.
- Definition Classes
- Chunk
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
iterator: Iterator[A]
Creates an iterator that iterates the elements of this chunk.
Creates an iterator that iterates the elements of this chunk. The returned iterator is not thread safe.
- Definition Classes
- Chunk
-
def
map[B](f: (A) ⇒ B): NonEmptyChunk[B]
Applies
f
to each element of this chunk, resulting in a new chunk of the same size.Applies
f
to each element of this chunk, resulting in a new chunk of the same size.- Definition Classes
- NonEmptyChunk → Chunk
-
def
mapAccumulate[S, B](s0: S)(f: (S, A) ⇒ (S, B)): (S, NonEmptyChunk[B])
Simultaneously folds and maps this chunk, returning the output of the fold and the transformed chunk.
Simultaneously folds and maps this chunk, returning the output of the fold and the transformed chunk.
- Definition Classes
- NonEmptyChunk → Chunk
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nonEmpty: Boolean
Returns true if this chunk has at least 1 element.
Returns true if this chunk has at least 1 element.
- Definition Classes
- Chunk
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
reduceLeft[A2 >: A](f: (A2, A) ⇒ A2): A2
Like
foldLeft
but uses the first element of the chunk as the starting value. -
def
reduceRight[A2 >: A](f: (A, A2) ⇒ A2): A2
Like
foldRight
but uses the first element of the chunk as the starting value. -
def
scanLeft[B](z: B)(f: (B, A) ⇒ B): NonEmptyChunk[B]
Like
foldLeft
but each intermediateB
value is output.Like
foldLeft
but each intermediateB
value is output.- Definition Classes
- NonEmptyChunk → Chunk
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tail: Chunk[A]
Returns the all but the first element of the chunk.
-
def
toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
Copies the elements of this chunk to an array.
Copies the elements of this chunk to an array.
- Definition Classes
- Chunk
-
def
toBooleans[B >: A](implicit ev: =:=[B, Boolean]): Booleans
Converts this chunk to a
Chunk.Booleans
, allowing access to the underlying array of elements.Converts this chunk to a
Chunk.Booleans
, allowing access to the underlying array of elements. If this chunk is already backed by an unboxed array of booleans, this method runs in constant time. Otherwise, this method will copy of the elements of this chunk in to a single array.- Definition Classes
- Chunk
-
def
toBytes[B >: A](implicit ev: =:=[B, Byte]): Bytes
Converts this chunk to a
Chunk.Bytes
, allowing access to the underlying array of elements.Converts this chunk to a
Chunk.Bytes
, allowing access to the underlying array of elements. If this chunk is already backed by an unboxed array of booleans, this method runs in constant time. Otherwise, this method will copy of the elements of this chunk in to a single array.- Definition Classes
- Chunk
-
def
toDoubles[B >: A](implicit ev: =:=[B, Double]): Doubles
Converts this chunk to a
Chunk.Doubles
, allowing access to the underlying array of elements.Converts this chunk to a
Chunk.Doubles
, allowing access to the underlying array of elements. If this chunk is already backed by an unboxed array of booleans, this method runs in constant time. Otherwise, this method will copy of the elements of this chunk in to a single array.- Definition Classes
- Chunk
-
def
toList: List[A]
Converts this chunk to a list.
Converts this chunk to a list.
- Definition Classes
- Chunk
-
def
toLongs[B >: A](implicit ev: =:=[B, Long]): Longs
Converts this chunk to a
Chunk.Longs
, allowing access to the underlying array of elements.Converts this chunk to a
Chunk.Longs
, allowing access to the underlying array of elements. If this chunk is already backed by an unboxed array of booleans, this method runs in constant time. Otherwise, this method will copy of the elements of this chunk in to a single array.- Definition Classes
- Chunk
-
def
toString(): String
- Definition Classes
- Chunk → AnyRef → Any
-
def
toVector: Vector[A]
Converts this chunk to a vector.
Converts this chunk to a vector.
- Definition Classes
- Chunk
-
def
uncons: Option[(A, Chunk[A])]
If this chunk is non-empty, returns the first element of the chunk and the rest as a new chunk.
If this chunk is non-empty, returns the first element of the chunk and the rest as a new chunk. Otherwise, returns none.
- Definition Classes
- Chunk
-
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( ... )
-
def
→[B](y: B): (NonEmptyChunk[A], B)
- Implicit
- This member is added by an implicit conversion from NonEmptyChunk[A] to ArrowAssoc[NonEmptyChunk[A]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc