package collection
- Alphabetic
- By Inheritance
- collection
- LowPriority
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
type
AnyConstr[X] = Any
Needed to circumvent a difficulty between dotty and scalac concerning the right top type for a type parameter of kind * -> *.
Needed to circumvent a difficulty between dotty and scalac concerning the right top type for a type parameter of kind * -> *. In Scalac, we can provide
Any
, asAny
is kind-polymorphic. In dotty this is not allowed. In dotty, we can provide[X] => Any
. But Scalac does not know lambda syntax. -
trait
ArrayLike
[+A] extends Any
A trait representing indexable collections with finite length
- final class ArrayOps [A] extends AnyVal with IterableOnce[A] with IndexedSeqOps[A, collection.immutable.IndexedSeq, Array[A]] with StrictOptimizedIterableOps[A, Seq, Array[A]] with ArrayLike[A]
- case class ArrayView [A](xs: Array[A]) extends IndexedView[A] with Product with Serializable
-
trait
BitSet
extends SortedSet[Int] with BitSetOps[BitSet]
Base type of bitsets
-
trait
BitSetOps
[+C <: BitSet with BitSetOps[C]] extends SortedSetOps[Int, SortedSet, C]
Base implementation type of bitsets
-
trait
BuildFrom
[-From, -A, +C] extends Any
Builds a collection of type
C
from elements of typeA
when a source collection of typeFrom
is available.Builds a collection of type
C
from elements of typeA
when a source collection of typeFrom
is available. Implicit instances ofBuildFrom
are available for all collection types.- From
Type of source collection
- A
Type of elements (e.g.
Int
,Boolean
, etc.)- C
Type of collection (e.g.
List[Int]
,TreeMap[Int, String]
, etc.)
- trait BuildFromLowPriority extends AnyRef
-
trait
Factory
[-A, +C] extends Any
A factory that builds a collection of type
C
with elements of typeA
.A factory that builds a collection of type
C
with elements of typeA
.This is a general form of any factory (IterableFactory, SortedIterableFactory, MapFactory and SortedMapFactory) whose element type is fixed.
- A
Type of elements (e.g.
Int
,Boolean
, etc.)- C
Type of collection (e.g.
List[Int]
,TreeMap[Int, String]
, etc.)
-
trait
IndexedSeq
[+A] extends Seq[A] with IndexedSeqOps[A, IndexedSeq, IndexedSeq[A]]
Base trait for indexed sequences that have efficient
apply
andlength
-
trait
IndexedSeqOps
[+A, +CC[X] <: IndexedSeq[X], +C] extends SeqOps[A, CC, C]
Base trait for indexed Seq operations
-
trait
IndexedView
[+A] extends View[A] with ArrayLike[A] with SeqOps[A, View, IndexedView[A]]
View defined in terms of indexing a range
-
trait
Iterable
[+A] extends IterableOnce[A] with IterableOps[A, Iterable, Iterable[A]]
Base trait for generic collections
-
trait
IterableFactory
[+CC[_]] extends IterableFactoryLike[CC]
Base trait for companion objects of unconstrained collection types that can build a target collection
CC
from a source collection with a single traversal of the source.Base trait for companion objects of unconstrained collection types that can build a target collection
CC
from a source collection with a single traversal of the source.- CC
Collection type constructor (e.g.
List
)
-
trait
IterableFactoryLike
[+CC[_]] extends AnyRef
Base trait for companion objects of unconstrained collection types that may require multiple traversals of a source collection to build a target collection
CC
. - trait IterableOnce [+A] extends Any
-
trait
IterableOps
[+A, +CC[X], +C] extends Any
Base trait for Iterable operations
Base trait for Iterable operations
VarianceNote
We require that for all child classes of Iterable the variance of the child class and the variance of the
C
parameter passed toIterableOps
are the same. We cannot express this since we lack variance polymorphism. That's why we have to resort at some places to writeC[A @uncheckedVariance]
.- CC
type constructor of the collection (e.g.
List
,Set
). Operations returning a collection with a different type of elementB
(e.g.map
) return aCC[B]
.- C
type of the collection (e.g.
List[Int]
,String
,BitSet
). Operations returning a collection with the same type of element (e.g.drop
,filter
) return aC
.
-
trait
Iterator
[+A] extends IterableOnce[A]
A core Iterator class
-
trait
LinearSeq
[+A] extends Seq[A] with LinearSeqOps[A, LinearSeq, LinearSeq[A]]
Base trait for linearly accessed sequences that have efficient
head
andtail
operations.Base trait for linearly accessed sequences that have efficient
head
andtail
operations. Known subclasses: List, LazyList -
trait
LinearSeqOps
[+A, +CC[X] <: LinearSeq[X], +C <: LinearSeq[A]] extends SeqOps[A, CC, C]
Base trait for linear Seq operations
-
trait
Map
[K, +V] extends Iterable[(K, V)] with MapOps[K, V, Map, Map[K, V]]
Base Map type
-
trait
MapFactory
[+CC[_, _]] extends AnyRef
Factory methods for collections of kind
* −> * -> *
-
trait
MapOps
[K, +V, +CC[X, Y] <: MapOps[X, Y, CC, _], +C <: MapOps[K, V, CC, C]] extends IterableOps[(K, V), Iterable, C] with PartialFunction[K, V] with Equals
Base Map implementation type
-
trait
Seq
[+A] extends Iterable[A] with SeqOps[A, Seq, Seq[A]]
Base trait for sequence collections
-
trait
SeqFactory
[+CC[_]] extends IterableFactory[CC]
Introduces factory methods
fill
andtabulate
.Introduces factory methods
fill
andtabulate
.- CC
Collection type constructor (e.g.
List
)
-
trait
SeqOps
[+A, +CC[X], +C] extends IterableOps[A, CC, C] with ArrayLike[A] with Equals
Base trait for Seq operations
-
trait
Set
[A] extends Iterable[A] with SetOps[A, Set, Set[A]]
Base trait for set collections.
-
trait
SetOps
[A, +CC[_], +C <: SetOps[A, CC, C]] extends IterableOps[A, CC, C] with (A) ⇒ Boolean with Equals
Base trait for set operations
-
trait
SortedIterableFactory
[+CC[_]] extends AnyRef
Base trait for companion objects of collections that require an implicit evidence
-
trait
SortedMap
[K, +V] extends Map[K, V] with SortedMapOps[K, V, SortedMap, SortedMap[K, V]]
Base type of sorted sets
-
trait
SortedMapFactory
[+CC[_, _]] extends AnyRef
Factory methods for collections of kind
* −> * -> *
which require an implicit evidence value for the key type - trait SortedMapOps [K, +V, +CC[X, Y] <: Map[X, Y] with SortedMapOps[X, Y, CC, _], +C <: SortedMapOps[K, V, CC, C]] extends MapOps[K, V, Map, C] with SortedOps[K, C]
-
trait
SortedOps
[A, +C] extends AnyRef
Base trait for sorted collections
-
trait
SortedSet
[A] extends Set[A] with SortedSetOps[A, SortedSet, SortedSet[A]]
Base type of sorted sets
- trait SortedSetOps [A, +CC[X] <: SortedSet[X], +C <: SortedSetOps[A, CC, C]] extends SetOps[A, Set, C] with SortedOps[A, C]
- trait SpecificIterableFactory [-A, +C] extends Factory[A, C]
-
trait
StrictOptimizedIterableOps
[+A, +CC[_], +C] extends IterableOps[A, CC, C]
Trait that overrides operations to take advantage of strict builders.
Trait that overrides operations to take advantage of strict builders.
- A
Elements type
- C
Collection type
-
trait
StrictOptimizedSeqOps
[+A, +CC[_], +C] extends SeqOps[A, CC, C] with StrictOptimizedIterableOps[A, CC, C]
Trait that overrides operations on sequences in order to take advantage of strict builders.
- final class StringOps extends AnyVal with IterableOnce[Char] with IndexedSeqOps[Char, collection.immutable.IndexedSeq, String] with StrictOptimizedIterableOps[Char, collection.immutable.IndexedSeq, String] with ArrayLike[Char]
- case class StringView (s: String) extends IndexedView[Char] with Product with Serializable
-
trait
View
[+A] extends Iterable[A] with IterableOps[A, View, View[A]]
Concrete collection type: View
-
abstract
class
WithFilter
[+A, +CC[_]] extends AnyRef
A template trait that contains just the
map
,flatMap
,foreach
andwithFilter
methods of traitIterable
.A template trait that contains just the
map
,flatMap
,foreach
andwithFilter
methods of traitIterable
.- A
Element type (e.g.
Int
)- CC
Collection type constructor (e.g.
List
)
- implicit final class toNewIterator [A] extends AnyVal
- implicit final class toNewSeq [A] extends AnyVal
- implicit final class toOldIterator [A] extends AnyVal
- implicit final class toOldSeq [A] extends AnyVal
Value Members
-
implicit
def
arrayToArrayOps[A](as: Array[A]): ArrayOps[A]
Decorator to add collection operations to arrays.
-
implicit
def
arrayToView[T](xs: Array[T]): ArrayView[T]
Convert array to iterable via view.
Convert array to iterable via view. Lower priority than ArrayOps
- Definition Classes
- LowPriority
- implicit def optionToIterableOnce[A](maybeA: Option[A]): IterableOnce[A]
-
implicit
def
stringToStringOps(s: String): StringOps
Decorator to add collection operations to strings.
-
implicit
def
stringToView(s: String): StringView
Convert string to iterable via view.
Convert string to iterable via view. Lower priority than StringOps
- Definition Classes
- LowPriority
-
object
+:
An extractor used to head/tail deconstruct sequences.
-
object
:+
An extractor used to init/last deconstruct sequences.
- object BitSetOps
- object BuildFrom extends BuildFromLowPriority
-
object
Hashing
- Attributes
- protected
- object IndexedSeq extends Delegate[IndexedSeq]
- object IndexedView
- object Iterable extends Delegate[Iterable]
- object IterableFactory
- object Iterator
- object Map extends Delegate[Map]
- object MapFactory
- object Seq extends Delegate[Seq]
- object SeqFactory
- object SeqOps
- object Set extends Delegate[Set]
- object SortedIterableFactory
- object SortedMap extends Delegate[SortedMap]
- object SortedMapFactory
- object SortedSet extends Delegate[SortedSet]
-
object
View
extends IterableFactoryLike[View]
This object reifies operations on views as case classes