NEList

izumi.fundamentals.collections.nonempty.NEList
See theNEList companion class
object NEList extends NEListInstances

Companion object for class NEList.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
NEList.type

Members list

Type members

Classlikes

final implicit class OptionOps[+A](option: Option[NEList[A]]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def apply[T](singleElement: T): NEList[T]

Constructs a new NEList of one element

Constructs a new NEList of one element

Attributes

def apply[T](firstElement: T, secondElement: T, otherElements: T*): NEList[T]

Constructs a new NEList given at least two elements.

Constructs a new NEList given at least two elements.

Type parameters

T

the type of the element contained in the new NEList

Value parameters

firstElement

the first element (with index 0) contained in this NEList

otherElements

a varargs of zero or more other elements (with index 1, 2, 3, ...) contained in this NEList

Attributes

def apply[T](firstElement: T, otherElements: Iterable[T]): NEList[T]

Constructs a new NEList given at least one element.

Constructs a new NEList given at least one element.

Attributes

def from[T](list: List[T]): Option[NEList[T]]

Optionally construct a NEList containing the elements, if any, of a given List.

Optionally construct a NEList containing the elements, if any, of a given List.

Value parameters

list

the List with which to construct a NEList

Attributes

Returns

a NEList containing the elements of the given List, if non-empty, wrapped in a Some; else None if the List is empty

def from[T](seq: Iterable[T]): Option[NEList[T]]

Optionally construct a NEList containing the elements, if any, of a given Seq.

Optionally construct a NEList containing the elements, if any, of a given Seq.

Value parameters

seq

the Seq with which to construct a NEList

Attributes

Returns

a NEList containing the elements of the given Seq, if non-empty, wrapped in a Some; else None if the Seq is empty

def from[T](iterableOnce: IterableOnce[T]): Option[NEList[T]]
def unapplySeq[T](NEList: NEList[T]): Some[Seq[T]]

Variable argument extractor for NELists.

Variable argument extractor for NELists.

Value parameters

NEList:

the NEList containing the elements to extract

Attributes

Returns

an Seq containing this NELists elements, wrapped in a Some

def unsafeFrom[T](list: List[T]): NEList[T]

Implicits

Implicits

final implicit def OptionOps[A](option: Option[NEList[A]]): OptionOps[A]
implicit def asIterable[A](nel: NEList[A]): Iterable[A]

Inherited implicits

implicit def factoryNel[A]: Factory[A, NEList[A]]

Attributes

Inherited from:
NEListInstances