Every

object Every

Companion object for abstract class Every.

Companion:
class
Source:
Every.scala
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Every.type

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
Source:
Mirror.scala
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror
Source:
Mirror.scala

Value members

Concrete methods

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

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
def from[T](seq: Seq[T]): Option[Every[T]]

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 an Every

Returns:

an Every containing the elements of the given GenSeq, if non-empty, wrapped in a Some; else None if the GenSeq is empty

Source:
Every.scala
def unapplySeq[T](every: Every[T]): Option[Seq[T]]

Variable argument extractor for Everys.

Variable argument extractor for Everys.

Value parameters:
every:

the Every containing the elements to extract

Returns:

an Seq containing this Everys elements, wrapped in a Some

Source:
Every.scala

Implicits

Implicits

implicit def everyToGenTraversableOnce[E](every: Every[E]): IndexedSeq[E]

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 a GenTraversableOnce

Returns:

an immutable IndexedSeq containing the elements, in order, of this Every

Source:
Every.scala