Scala Library: scala.collection.generic.GenericSetTemplate
scala.collection.generic.GenericSetTemplate
- Source
- Since
- 2.8
Abstract Value Members From scala.collection.generic.GenericTraversableTemplate ——————————————————————————–
abstract def companion: GenericCompanion[CC]
The factory companion object that builds instances of class Traversable. (or its
Iterable
superclass where class Traversable is not a Seq
.)
- Definition Classes
- GenericTraversableTemplate
(defined at scala.collection.generic.GenericTraversableTemplate)
Concrete Value Members From scala.collection.generic.GenericTraversableTemplate ——————————————————————————–
abstract def head: A
Selects the first element of this collection.
- returns
- the first element of this collection.
- Definition Classes
- GenericTraversableTemplate
- Exceptions thrown
- NoSuchElementException if the collection is empty.
(defined at scala.collection.generic.GenericTraversableTemplate)
abstract def foreach[U](f: (A) ⇒ U): Unit
[use case]
- f
- the function that is applied for its side-effect to every element. The
result of function
f
is discarded.
- the function that is applied for its side-effect to every element. The
result of function
- Definition Classes
- GenericTraversableTemplate
(defined at scala.collection.generic.GenericTraversableTemplate)
def genericBuilder[B]: Builder[B, CC[B]]
The generic builder that builds instances of Traversable at arbitrary element types.
- Definition Classes
- GenericTraversableTemplate
(defined at scala.collection.generic.GenericTraversableTemplate)
def newBuilder: Builder[A, CC[A]]
The builder that builds instances of type Traversable[A]
- Attributes
- protected[this]
- Definition Classes
- GenericTraversableTemplate → HasNewBuilder
(defined at scala.collection.generic.GenericTraversableTemplate)
def transpose[B](implicit asTraversable: (A) ⇒ GenTraversableOnce[B]): CC[CC[B]]
Transposes this collection of traversable collections into a collection of collections.
The resulting collection’s type will be guided by the static type of collection. For example:
- B
- the type of the elements of each traversable collection.
- asTraversable
- an implicit conversion which asserts that the element type of this
collection is a
Traversable
.
- an implicit conversion which asserts that the element type of this
collection is a
- returns
- a two-dimensional collection of collections which has as n th row the n th column of this collection.
- Definition Classes
- GenericTraversableTemplate
- Annotations
- @migration
- Migration
- (Changed in version 2.9.0)
transpose
throws anIllegalArgumentException
if collections are not uniformly sized.
- (Changed in version 2.9.0)
- Exceptions thrown
- IllegalArgumentException if all collections in this collection are not of the same size.
(defined at scala.collection.generic.GenericTraversableTemplate)
def unzip3[A1, A2, A3](implicit asTriple: (A) ⇒ (A1, A2, A3)): (CC[A1], CC[A2], CC[A3])
Converts this collection of triples into three collections of the first, second, and third element of each triple.
- A1
- the type of the first member of the element triples
- A2
- the type of the second member of the element triples
- A3
- the type of the third member of the element triples
- asTriple
- an implicit conversion which asserts that the element type of this collection is a triple.
- returns
- a triple of collections, containing the first, second, respectively third member of each element triple of this collection.
- Definition Classes
- GenericTraversableTemplate
(defined at scala.collection.generic.GenericTraversableTemplate)
def unzip[A1, A2](implicit asPair: (A) ⇒ (A1, A2)): (CC[A1], CC[A2])
Converts this collection of pairs into two collections of the first and second half of each pair.
- A1
- the type of the first half of the element pairs
- A2
- the type of the second half of the element pairs
- asPair
- an implicit conversion which asserts that the element type of this collection is a pair.
- returns
- a pair of collections, containing the first, respectively second half of each element pair of this collection.
- Definition Classes
- GenericTraversableTemplate
(defined at scala.collection.generic.GenericTraversableTemplate)
Concrete Value Members From Implicit scala.collection.parallel.CollectionsHaveToParArray ——————————————————————————–
def toParArray: ParArray[T]
- Implicit information
- This member is added by an implicit conversion from GenericSetTemplate [A, CC] to CollectionsHaveToParArray [GenericSetTemplate [A, CC], T] performed by method CollectionsHaveToParArray in scala.collection.parallel. This conversion will take place only if an implicit value of type ( GenericSetTemplate [A, CC]) ⇒ GenTraversableOnce [T] is in scope.
- Definition Classes
- CollectionsHaveToParArray (added by implicit convertion: scala.collection.parallel.CollectionsHaveToParArray)
Full Source:
Interested in Scala?
I send out weekly, personalized emails with articles and conference talks.
Subscribe now.