Companion object for abstract class Every
.
- Companion:
- class
- Source:
- Every.scala
Type members
Inherited types
The names of the product elements
The names of the product elements
- Inherited from:
- Mirror
- Source:
- Mirror.scala
Value members
Concrete methods
Constructs a new Every
given at least one element.
Constructs a new Every
given at least one element.
- Type parameters:
- T
the type of the element contained in the new
Every
- Value parameters:
- firstElement
the first element (with index 0) contained in this
Every
- otherElements
a varargs of zero or more other elements (with index 1, 2, 3, ...) contained in this
Every
- Source:
- Every.scala
Optionally construct an Every
containing the elements, if any, of a given GenSeq
.
Optionally construct an Every
containing the elements, if any, of a given GenSeq
.
- Value parameters:
- seq
the
GenSeq
with which to construct anEvery
- Returns:
an
Every
containing the elements of the givenGenSeq
, if non-empty, wrapped in aSome
; elseNone
if theGenSeq
is empty- Source:
- Every.scala
Variable argument extractor for Every
s.
Variable argument extractor for Every
s.
- Value parameters:
- every:
the
Every
containing the elements to extract
- Returns:
an
Seq
containing thisEvery
s elements, wrapped in aSome
- Source:
- Every.scala
Implicits
Implicits
Implicit conversion from Every
to immutable IndexedSeq
.
Implicit conversion from Every
to immutable IndexedSeq
.
One use case for this implicit conversion is to enable GenSeq[Every]
s to be flattened.
Here's an example:
scala> Vector(Every(1, 2, 3), Every(3, 4), Every(5, 6, 7, 8)).flatten res0: scala.collection.immutable.Vector[Int] = Vector(1, 2, 3, 3, 4, 5, 6, 7, 8)
- Value parameters:
- every
the
Every
to convert to aGenTraversableOnce
- Returns:
an immutable
IndexedSeq
containing the elements, in order, of thisEvery
- Source:
- Every.scala