Companion object for class NonEmptyList
.
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- NonEmptyList.type
Members list
Type members
Classlikes
Attributes
- Graph
- Supertypes
- class AnyValtrait Matchableclass Any
Value members
Concrete methods
Constructs a new NonEmptyList
of one element
Constructs a new NonEmptyList
of one element
Attributes
Constructs a new NonEmptyList
given at least two elements.
Constructs a new NonEmptyList
given at least two elements.
Attributes
- T
the type of the element contained in the new
NonEmptyList
- firstElement
the first element (with index 0) contained in this
NonEmptyList
- otherElements
a varargs of zero or more other elements (with index 1, 2, 3, ...) contained in this
NonEmptyList
Constructs a new NonEmptyList
given at least one element.
Constructs a new NonEmptyList
given at least one element.
Attributes
Optionally construct a NonEmptyList
containing the elements, if any, of a given List
.
Optionally construct a NonEmptyList
containing the elements, if any, of a given List
.
Attributes
- list
the
List
with which to construct aNonEmptyList
- Returns:
a
NonEmptyList
containing the elements of the givenList
, if non-empty, wrapped in aSome
; elseNone
if theList
is empty
Optionally construct a NonEmptyList
containing the elements, if any, of a given Seq
.
Optionally construct a NonEmptyList
containing the elements, if any, of a given Seq
.
Attributes
- seq
the
Seq
with which to construct aNonEmptyList
- Returns:
a
NonEmptyList
containing the elements of the givenSeq
, if non-empty, wrapped in aSome
; elseNone
if theSeq
is empty
Variable argument extractor for NonEmptyList
s.
Variable argument extractor for NonEmptyList
s.
Attributes
- nonEmptyList:
the
NonEmptyList
containing the elements to extract- Returns:
an
Seq
containing thisNonEmptyList
s elements, wrapped in aSome