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
CanBuild
[-A, +C] extends BuildFrom[Any, A, C]
Builds a collection of type
C
from elements of typeA
Builds a collection of type
C
from elements of typeA
- 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]
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 AnyRef
Base trait for companion objects of unconstrained collection types
- 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]
. -
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[X, Y]] extends AnyRef
Factory methods for collections of kind
* −> * -> *
-
trait
MapOps
[K, +V, +CC[X, Y] <: Map[X, Y], +C <: Map[K, V]] 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
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[X], +C <: Set[A]] 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[X, Y]] 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] <: SortedMap[X, Y] with SortedMapOps[X, Y, CC, _], +C <: SortedMap[K, V]] 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 <: SortedSet[A]] extends SetOps[A, Set, C] with SortedOps[A, C]
- trait SpecificIterableFactory [-A, +C] extends CanBuild[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
- 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
- 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 BitSetOps
-
object
Hashing
- Attributes
- protected
- object IndexedSeq extends Delegate[IndexedSeq]
- object IndexedView
- object IterableFactory
- object Iterator
- object Map extends Delegate[Map]
- object MapFactory
- object SeqOps
- object Set extends Delegate[Set]
- object SortedIterableFactory
- object SortedMap extends Delegate[SortedMap]
- object SortedMapFactory
- object SortedSet extends Delegate[SortedSet]
-
object
View
extends IterableFactory[View]
This object reifies operations on views as case classes