NonEmptyList

oxygen.core.NonEmptyList
See theNonEmptyList companion object
final case class NonEmptyList[+A](head: A, tail: List[A]) extends PartialFunction[Int, A]

Attributes

Companion
object
Experimental
true
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait PartialFunction[Int, A]
trait Int => A
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def ++[A2 >: A](that: NonEmptyList[A2]): NonEmptyList[A2]
def ++[A2 >: A](that: IterableOnce[A2]): NonEmptyList[A2]
def +:[A2 >: A](value: A2): NonEmptyList[A2]
def :+[A2 >: A](value: A2): NonEmptyList[A2]
def ::[A2 >: A](value: A2): NonEmptyList[A2]
def :::[A2 >: A](that: NonEmptyList[A2]): NonEmptyList[A2]
def appended[B >: A](value: B): NonEmptyList[B]
def appendedAll[B >: A](suffix: IterableOnce[B]): NonEmptyList[B]
override def apply(n: Int): A

Attributes

Definition Classes
Function1
def collectFirst[B](pf: PartialFunction[A, B]): Option[B]
def contains[A1 >: A](elem: A1): Boolean
def distinctBy[B](f: A => B): NonEmptyList[A]
def exists(p: A => Boolean): Boolean
def find(p: A => Boolean): Option[A]
def findLast(p: A => Boolean): Option[A]
def flatMap[B](f: A => NonEmptyList[B]): NonEmptyList[B]
def flatten[B](implicit ev: A <:< NonEmptyList[B]): NonEmptyList[B]
def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
def foldLeft[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
def foldRight[B](z: B)(op: (A, B) => B): B
def forall(p: A => Boolean): Boolean
def groupBy[K](f: A => K): Map[K, NonEmptyList[A]]
def groupMap[K, B](key: A => K)(f: A => B): Map[K, NonEmptyList[B]]
def groupMapReduce[K, B](key: A => K)(f: A => B)(reduce: (B, B) => B): Map[K, B]
override def hashCode(): Int

Calculates a hash code value for the object.

Calculates a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Attributes

Returns

the hash code value for this object.

Definition Classes
Any
override def isDefinedAt(x: Int): Boolean

Attributes

Definition Classes
PartialFunction
def iterator: Iterator[A]
def last: A
def length: Int
def map[B](f: A => B): NonEmptyList[B]
def max[B >: A](implicit ord: Ordering[B]): A
def maxBy[B](f: A => B)(implicit cmp: Ordering[B]): A
def min[B >: A](implicit ord: Ordering[B]): A
def minBy[B](f: A => B)(implicit cmp: Ordering[B]): A
def mkString: String
def mkString(sep: String): String
def mkString(start: String, sep: String, end: String): String
def prepended[B >: A](value: B): NonEmptyList[B]
def prependedAll[B >: A](prefix: IterableOnce[B]): NonEmptyList[B]
def product[B >: A](implicit num: Numeric[B]): B
def reduce[B >: A](op: (B, B) => B): B
def reduceLeft[B >: A](op: (B, A) => B): B
def reduceRight[B >: A](op: (A, B) => B): B
def sortBy[B](f: A => B)(implicit ord: Ordering[B]): NonEmptyList[A]
def sortWith(lt: (A, A) => Boolean): NonEmptyList[A]
def sorted[B >: A](implicit ord: Ordering[B]): NonEmptyList[A]
def sum[B >: A](implicit num: Numeric[B]): B
def toArray[B >: A : ClassTag]: Array[B]
def toIndexedSeq: IndexedSeq[A]
def toMap[K, V](implicit ev: A <:< (K, V)): Map[K, V]
def toSet[B >: A]: Set[B]
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function1 -> Any
def toVector: Vector[A]
def zip[B](that: NonEmptyList[B]): NonEmptyList[(A, B)]
def zipWithIndex: NonEmptyList[(A, Int)]

Inherited methods

def andThen[C](k: PartialFunction[A, C]): PartialFunction[Int, C]

Attributes

Inherited from:
PartialFunction
override def andThen[C](k: A => C): PartialFunction[Int, C]

Attributes

Definition Classes
PartialFunction -> Function1
Inherited from:
PartialFunction
def applyOrElse[A1 <: Int, B1 >: A](x: A1, default: A1 => B1): B1

Attributes

Inherited from:
PartialFunction
def compose[R](k: PartialFunction[R, Int]): PartialFunction[R, A]

Attributes

Inherited from:
PartialFunction
def compose[A](g: A => Int): A => A

Attributes

Inherited from:
Function1
def elementWise: ElementWiseExtractor[Int, A]

Attributes

Inherited from:
PartialFunction
def lift: Int => Option[A]

Attributes

Inherited from:
PartialFunction
def orElse[A1 <: Int, B1 >: A](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]

Attributes

Inherited from:
PartialFunction
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def runWith[U](action: A => U): Int => Boolean

Attributes

Inherited from:
PartialFunction
def unapply(a: Int): Option[A]

Attributes

Inherited from:
PartialFunction

Concrete fields

val toList: List[A]