final case class Single[+A](head: A) extends NonEmptyList[A] with Product with Serializable
- Alphabetic
- By Inheritance
- Single
- Serializable
- Product
- Equals
- NonEmptyList
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Single(head: A)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ++[A1 >: A](that: NonEmptyList[A1]): NonEmptyList[A1]
Concatenates this
NonEmptyList
with the specifiedNonEmptyList
.Concatenates this
NonEmptyList
with the specifiedNonEmptyList
.- Definition Classes
- NonEmptyList
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def contains[A1 >: A](a: A1)(implicit A: Equal[A1]): Boolean
Returns whether this
NonEmptyList
contains the specified element.Returns whether this
NonEmptyList
contains the specified element.- Definition Classes
- NonEmptyList
- final def corresponds[B](that: NonEmptyList[B])(f: (A, B) => Boolean): Boolean
Determines whether this
NonEmptyList
and the specifiedNonEmptyList
have the same length and every pair of corresponding elements of thisNonEmptyList
and the specifiedNonEmptyList
satisfy the specified predicate.Determines whether this
NonEmptyList
and the specifiedNonEmptyList
have the same length and every pair of corresponding elements of thisNonEmptyList
and the specifiedNonEmptyList
satisfy the specified predicate.- Definition Classes
- NonEmptyList
- Annotations
- @tailrec()
- final def count(f: (A) => Boolean): Int
Returns the number of elements in this
NonEmptyList
that satisfy the specified predicate.Returns the number of elements in this
NonEmptyList
that satisfy the specified predicate.- Definition Classes
- NonEmptyList
- final def distinct: NonEmptyList[A]
Removes duplicate elements from this
NonEmptyList
.Removes duplicate elements from this
NonEmptyList
.- Definition Classes
- NonEmptyList
- final def drop(n: Int): List[A]
Drops the first
n
elements from thisNonEmptyList
returning aList
.Drops the first
n
elements from thisNonEmptyList
returning aList
.- Definition Classes
- NonEmptyList
- Annotations
- @tailrec()
- final def dropRight(n: Int): List[A]
Drops the last
n
elements from thisNonEmptyList
returning aList
.Drops the last
n
elements from thisNonEmptyList
returning aList
.- Definition Classes
- NonEmptyList
- final def dropWhile(f: (A) => Boolean): List[A]
Drops elements from the start of this
NonEmptyList
that satisfy the specified predicate returning aList
.Drops elements from the start of this
NonEmptyList
that satisfy the specified predicate returning aList
.- Definition Classes
- NonEmptyList
- Annotations
- @tailrec()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def equals(that: Any): Boolean
Returns whether this
NonEmptyList
and the specifiedNonEmptyList
are equal to each other.Returns whether this
NonEmptyList
and the specifiedNonEmptyList
are equal to each other.- Definition Classes
- NonEmptyList → AnyRef → Any
- final def exists(f: (A) => Boolean): Boolean
Returns whether an element exists in this
NonEmptyList
satisfying the specified predicate.Returns whether an element exists in this
NonEmptyList
satisfying the specified predicate.- Definition Classes
- NonEmptyList
- Annotations
- @tailrec()
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def find(f: (A) => Boolean): Option[A]
Returns the first element in this
NonEmptyList
satisfying the specified predicate orNone
otherwise.Returns the first element in this
NonEmptyList
satisfying the specified predicate orNone
otherwise.- Definition Classes
- NonEmptyList
- Annotations
- @tailrec()
- final def flatMap[B](f: (A) => NonEmptyList[B]): NonEmptyList[B]
Transforms each element of this
NonEmptyList
to aNonEmptyList
and combines them into a singleNonEmptyList
.Transforms each element of this
NonEmptyList
to aNonEmptyList
and combines them into a singleNonEmptyList
.- Definition Classes
- NonEmptyList
- final def flatten[B](implicit ev: <:<[A, NonEmptyList[B]]): NonEmptyList[B]
Flattens a
NonEmptyList
ofNonEmptyList
values into a singleNonEmptyList
.Flattens a
NonEmptyList
ofNonEmptyList
values into a singleNonEmptyList
.- Definition Classes
- NonEmptyList
- final def foldLeft[B](z: B)(f: (B, A) => B): B
Folds over the elements of this
NonEmptyList
from left to right using the specified initial value and combining functionFolds over the elements of this
NonEmptyList
from left to right using the specified initial value and combining function- Definition Classes
- NonEmptyList
- Annotations
- @tailrec()
- final def foldRight[B](z: B)(op: (A, B) => B): B
Folds over the elements of this
NonEmptyList
from right to left using the specified initial value and combining function.Folds over the elements of this
NonEmptyList
from right to left using the specified initial value and combining function.- Definition Classes
- NonEmptyList
- final def forEach[F[+_], B](f: (A) => F[B])(implicit arg0: AssociativeBoth[F], arg1: Covariant[F]): F[NonEmptyList[B]]
Transforms each element of this
NonEmptyList
with the specified effectual function.Transforms each element of this
NonEmptyList
with the specified effectual function.- Definition Classes
- NonEmptyList
- final def forall(f: (A) => Boolean): Boolean
Returns whether all elements of this
NonEmptyList
satisfy the specified predicate.Returns whether all elements of this
NonEmptyList
satisfy the specified predicate.- Definition Classes
- NonEmptyList
- Annotations
- @tailrec()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def hashCode(): Int
Returns the hashCode of this
NonEmptyList
.Returns the hashCode of this
NonEmptyList
.- Definition Classes
- NonEmptyList → AnyRef → Any
- val head: A
Returns the head of this
NonEmptyList
.Returns the head of this
NonEmptyList
.- Definition Classes
- Single → NonEmptyList
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def length: Int
Returns the length of this
NonEmptyList
.Returns the length of this
NonEmptyList
.- Definition Classes
- NonEmptyList
- final def map[B](f: (A) => B): NonEmptyList[B]
Transforms the elements of this
NonEmptyList
with the specified function.Transforms the elements of this
NonEmptyList
with the specified function.- Definition Classes
- NonEmptyList
- final def max(implicit A: Ord[A]): A
Returns the maximum element in this
NonEmptyList
.Returns the maximum element in this
NonEmptyList
.- Definition Classes
- NonEmptyList
- final def maxBy[B](f: (A) => B)(implicit B: Ord[B]): A
Returns the maximum element in this
NonEmptyList
using the specified function to map values of typeA
to values of typeB
that an ordering is defined on.Returns the maximum element in this
NonEmptyList
using the specified function to map values of typeA
to values of typeB
that an ordering is defined on.- Definition Classes
- NonEmptyList
- final def min(implicit A: Ord[A]): A
Returns the minimum element in this
NonEmptyList
.Returns the minimum element in this
NonEmptyList
.- Definition Classes
- NonEmptyList
- final def minBy[B](f: (A) => B)(implicit B: Ord[B]): A
Returns the minimum element in this
NonEmptyList
using the specified function to map values of typeA
to values of typeB
that an ordering is defined on.Returns the minimum element in this
NonEmptyList
using the specified function to map values of typeA
to values of typeB
that an ordering is defined on.- Definition Classes
- NonEmptyList
- final def mkString(start: String, sep: String, end: String): String
Renders the elements of this
NonEmptyList
as aString
using the specified separator and start and end values.Renders the elements of this
NonEmptyList
as aString
using the specified separator and start and end values.- Definition Classes
- NonEmptyList
- final def mkString(sep: String): String
Renders the elements of this
NonEmptyList
as aString
using the specified separator.Renders the elements of this
NonEmptyList
as aString
using the specified separator.- Definition Classes
- NonEmptyList
- final def mkString: String
Renders the elements of this
NonEmptyList
as aString
.Renders the elements of this
NonEmptyList
as aString
.- Definition Classes
- NonEmptyList
- 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()
- final def peel: (A, List[A])
Decomposes the
NonEmptyList
into an element and a (possibly empty)List
Decomposes the
NonEmptyList
into an element and a (possibly empty)List
- Definition Classes
- NonEmptyList
- final def peelNonEmpty: (A, Option[NonEmptyList[A]])
Returns an element of this
NonEmptyList
and the remainder orNone
, if the remainder is empty.Returns an element of this
NonEmptyList
and the remainder orNone
, if the remainder is empty.- Definition Classes
- NonEmptyList
- final def product[A1 >: A](implicit A: Associative[Prod[A1]]): A1
Returns the product of the elements of this
NonEmptyList
.Returns the product of the elements of this
NonEmptyList
.- Definition Classes
- NonEmptyList
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def reduce[A1 >: A](implicit A: Associative[A1]): A1
Reduces the elements of this
NonEmptyList
using the specified associative operator.Reduces the elements of this
NonEmptyList
using the specified associative operator.- Definition Classes
- NonEmptyList
- final def reduceLeft[A1 >: A](f: (A1, A1) => A1): A1
Reduces the elements of this
NonEmptyList
from left to right using the specified function.Reduces the elements of this
NonEmptyList
from left to right using the specified function.- Definition Classes
- NonEmptyList
- final def reduceMap[B](f: (A) => B)(implicit B: Associative[B]): B
Maps each element of this
NonEmptyList
to a typeB
that has an associative operation then combines them all with the associative operation.Maps each element of this
NonEmptyList
to a typeB
that has an associative operation then combines them all with the associative operation.- Definition Classes
- NonEmptyList
- final def reduceMapLeft[B](map: (A) => B)(reduce: (B, A) => B): B
Reduces the elements of this
NonEmptyList
from left to right using the functionmap
to transform the first value to the typeB
and then the functionreduceAll
to combine theB
value with each otherA
value.Reduces the elements of this
NonEmptyList
from left to right using the functionmap
to transform the first value to the typeB
and then the functionreduceAll
to combine theB
value with each otherA
value.- Definition Classes
- NonEmptyList
- final def reduceMapRight[B](map: (A) => B)(reduce: (A, B) => B): B
Reduces the elements of this
NonEmptyList
from right to left using the functionmap
to transform the first value to the typeB
and then the functionreduceAll
to combine theB
value with each otherA
value.Reduces the elements of this
NonEmptyList
from right to left using the functionmap
to transform the first value to the typeB
and then the functionreduceAll
to combine theB
value with each otherA
value.- Definition Classes
- NonEmptyList
- final def reduceRight[A1 >: A](f: (A1, A1) => A1): A1
Reduces the elements of this
NonEmptyList
from right to left using the specified function.Reduces the elements of this
NonEmptyList
from right to left using the specified function.- Definition Classes
- NonEmptyList
- final def reverse: NonEmptyList[A]
Reverses the order of elements in this
NonEmptyList
.Reverses the order of elements in this
NonEmptyList
.- Definition Classes
- NonEmptyList
- final def sum[A1 >: A](implicit A: Associative[Sum[A1]]): A1
Returns the sum of the elements of this
NonEmptyList
.Returns the sum of the elements of this
NonEmptyList
.- Definition Classes
- NonEmptyList
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def tailNonEmpty: Option[NonEmptyList[A]]
Returns the tail of this
NonEmptyList
if it exists orNone
otherwise.Returns the tail of this
NonEmptyList
if it exists orNone
otherwise.- Definition Classes
- NonEmptyList
- final def tails: NonEmptyList[NonEmptyList[A]]
Returns a new
NonEmptyList
composed of thisNonEmptyList
followed by each of its tails, ending with a singletonNonEmptyList
.Returns a new
NonEmptyList
composed of thisNonEmptyList
followed by each of its tails, ending with a singletonNonEmptyList
.- Definition Classes
- NonEmptyList
- final def take(n: Int): List[A]
Takes the first
n
elements from thisNonEmptyList
returning aList
.Takes the first
n
elements from thisNonEmptyList
returning aList
.- Definition Classes
- NonEmptyList
- final def takeRight(n: Int): List[A]
Takes the last
n
elements from thisNonEmptyList
returning aList
.Takes the last
n
elements from thisNonEmptyList
returning aList
.- Definition Classes
- NonEmptyList
- final def takeWhile(f: (A) => Boolean): List[A]
Takes elements from the start of this
NonEmptyList
that satisfy the specified predicate returning aList
.Takes elements from the start of this
NonEmptyList
that satisfy the specified predicate returning aList
.- Definition Classes
- NonEmptyList
- final def toCons[A1 >: A]: ::[A1]
Converts this
NonEmptyList
to the::
case of aList
.Converts this
NonEmptyList
to the::
case of aList
.- Definition Classes
- NonEmptyList
- final def toNonEmptyChunk: NonEmptyChunk[A]
Converts this
NonEmptyList
to aNonEmptyChunk
.Converts this
NonEmptyList
to aNonEmptyChunk
.- Definition Classes
- NonEmptyList
- final def toString(): String
Renders this
NonEmptyList
as aString
.Renders this
NonEmptyList
as aString
.- Definition Classes
- NonEmptyList → 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()
- final def zip[B](that: NonEmptyList[B]): NonEmptyList[(A, B)]
Zips this
NonEmptyList
together with the specifiedNonEmptyList
, returning a newNonEmptyList
with a length equal to the minimum of the two and elements combined pairwise.Zips this
NonEmptyList
together with the specifiedNonEmptyList
, returning a newNonEmptyList
with a length equal to the minimum of the two and elements combined pairwise.- Definition Classes
- NonEmptyList
- final def zipWith[B, C](that: NonEmptyList[B])(f: (A, B) => C): NonEmptyList[C]
Zips this
NonEmptyList
together with the specifiedNonEmptyList
, returning a newNonEmptyList
with a length equal to the minimum of the two and elements combined pairwise using the specified function.Zips this
NonEmptyList
together with the specifiedNonEmptyList
, returning a newNonEmptyList
with a length equal to the minimum of the two and elements combined pairwise using the specified function.- Definition Classes
- NonEmptyList
- final def zipWithIndex: NonEmptyList[(A, Int)]
Annotates each element of this
NonEmptyList
with its index.Annotates each element of this
NonEmptyList
with its index.- Definition Classes
- NonEmptyList