scala.collection

Type members

Classlikes

object +:
An extractor used to head/tail deconstruct sequences.
Source
(source)
object :+
An extractor used to init/last deconstruct sequences.
Source
(source)
abstract class AbstractIndexedSeqView[+A] extends AbstractSeqView[A] with IndexedSeqView[A]
Explicit instantiation of the IndexedSeqView trait to reduce class file size in subclasses.
Source
(source)
abstract class AbstractIterable[+A] extends Iterable[A]
Explicit instantiation of the Iterable trait to reduce class file size in subclasses.
Source
(source)
abstract class AbstractIterator[+A] extends Iterator[A]
Explicit instantiation of the Iterator trait to reduce class file size in subclasses.
Source
(source)
abstract class AbstractMap[K, +V] extends AbstractIterable[(K, V)] with Map[K, V]
Explicit instantiation of the Map trait to reduce class file size in subclasses.
Source
(source)
abstract class AbstractMapView[K, +V] extends AbstractView[(K, V)] with MapView[K, V]
Explicit instantiation of the MapView trait to reduce class file size in subclasses.
Source
(source)
abstract class AbstractSeq[+A] extends AbstractIterable[A] with Seq[A]
Explicit instantiation of the Seq trait to reduce class file size in subclasses.
Source
(source)
abstract class AbstractSeqView[+A] extends AbstractView[A] with SeqView[A]
Explicit instantiation of the SeqView trait to reduce class file size in subclasses.
Source
(source)
abstract class AbstractSet[A] extends AbstractIterable[A] with Set[A]
Explicit instantiation of the Set trait to reduce class file size in subclasses.
Source
(source)
abstract class AbstractView[+A] extends AbstractIterable[A] with View[A]
Explicit instantiation of the View trait to reduce class file size in subclasses.
Source
(source)
trait AnyStepper[+A] extends Stepper[A]
A Stepper for arbitrary element types. See Stepper.
Companion
object
Source
(source)
object AnyStepper
Companion
class
Source
(source)
object ArrayOps
Companion
class
Source
(source)
final class ArrayOps[A](xs: Array[A]) extends AnyVal
This class serves as a wrapper for Arrays with many of the operations found in indexed sequences. Where needed, instances of arrays are implicitly converted into this class. There is generally no reason to create an instance explicitly or use an ArrayOps type. It is better to work with plain Array types instead and rely on the implicit conversion to ArrayOps when calling a method (which does not actually allocate an instance of ArrayOps because it is a value class).
Neither Array nor ArrayOps are proper collection types (i.e. they do not extend Iterable or even IterableOnce). mutable.ArraySeq and immutable.ArraySeq serve this purpose.
The difference between this class and ArraySeqs is that calling transformer methods such as filter and map will yield an array, whereas an ArraySeq will remain an ArraySeq.
Type Params
A
type of the elements contained in this array.
Companion
object
Source
(source)
trait BitSet extends SortedSet[Int] with BitSetOps[BitSet]
Base type of bitsets.
This trait provides most of the operations of a BitSet independently of its representation. It is inherited by all concrete implementations of bitsets.
Companion
object
Source
(source)
trait BitSetOps[+C <: BitSet & BitSetOps[C]] extends SortedSetOps[Int, [A] =>> SortedSet[A], C]
Base implementation type of bitsets
Companion
object
Source
(source)
object BitSetOps
Companion
class
Source
(source)
trait BufferedIterator[+A] extends Iterator[A]
Buffered iterators are iterators which provide a method head that inspects the next element without discarding it.
Source
(source)
@implicitNotFound(msg = "Cannot construct a collection of type ${C} with elements of type ${A} based on a collection of type ${From}.")
trait BuildFrom[-From, -A, +C]
Builds a collection of type C from elements of type A when a source collection of type From is available. Implicit instances of BuildFrom are available for all collection types.
Type Params
A
Type of elements (e.g. Int, Boolean, etc.)
C
Type of collection (e.g. List[Int], TreeMap[Int, String], etc.)
From
Type of source collection
Companion
object
Source
(source)
Companion
class
Source
(source)
trait ClassTagIterableFactory[+CC <: ([_$44] =>> Any)] extends EvidenceIterableFactory[CC, [T] =>> ClassTag[T]]
Base trait for companion objects of collections that require an implicit ClassTag.
Type Params
CC
Collection type constructor (e.g. ArraySeq)
Companion
object
Source
(source)
trait ClassTagSeqFactory[+CC <: ([A] =>> SeqOps[A, [A] =>> Seq[A], Seq[A]])] extends ClassTagIterableFactory[CC]
Type Params
CC
Collection type constructor (e.g. ArraySeq)
Companion
object
Source
(source)
Companion
class
Source
(source)
@deprecated("DefaultMap is no longer necessary; extend Map directly", "2.13.0")
trait DefaultMap[K, +V] extends Map[K, V]
A default map which builds a default immutable.Map implementation for all transformations.
Source
(source)
trait DoubleStepper extends Stepper[Double]
A Stepper for Doubles. See Stepper.
Companion
object
Source
(source)
Companion
class
Source
(source)
trait EvidenceIterableFactory[+CC <: ([_$30] =>> Any), Ev <: ([_$31] =>> Any)] extends Serializable
Base trait for companion objects of collections that require an implicit evidence.
Type Params
CC
Collection type constructor (e.g. ArraySeq)
Ev
Unary type constructor for the implicit evidence required for an element type (typically Ordering or ClassTag)
Companion
object
Source
(source)
trait EvidenceIterableFactoryDefaults[+A, +CC <: ([x] =>> IterableOps[x, CC, CC[x]]), Ev <: ([_$12] =>> Any)] extends IterableOps[A, CC, CC[A]]
This trait provides default implementations for the factory methods fromSpecific and newSpecificBuilder that need to be refined when implementing a collection type that refines the CC and C type parameters. It is used for collections that have an additional constraint, expressed by the evidenceIterableFactory method.
The default implementations in this trait can be used in the common case when CC[A] is the same as C.
Source
(source)
trait Factory[-A, +C]
A factory that builds a collection of type C with elements of type A.
This is a general form of any factory (IterableFactory, SortedIterableFactory, MapFactory and SortedMapFactory) whose element type is fixed.
Type Params
A
Type of elements (e.g. Int, Boolean, etc.)
C
Type of collection (e.g. List[Int], TreeMap[Int, String], etc.)
Companion
object
Source
(source)
object Factory
Companion
class
Source
(source)
trait IndexedSeq[+A] extends Seq[A] with IndexedSeqOps[A, [A] =>> IndexedSeq[A], IndexedSeq[A]] with IterableFactoryDefaults[A, [A] =>> IndexedSeq[A]]
Base trait for indexed sequences that have efficient apply and length
Companion
object
Source
(source)
object IndexedSeq extends Delegate[[A] =>> IndexedSeq[A]]
Companion
class
Source
(source)
trait IndexedSeqOps[+A, +CC <: ([_$1] =>> Any), +C] extends SeqOps[A, CC, C]
Base trait for indexed Seq operations
Source
(source)
trait IndexedSeqView[+A] extends IndexedSeqOps[A, [A] =>> View[A], View[A]] with SeqView[A]
View defined in terms of indexing a range
Companion
object
Source
(source)
Companion
class
Source
(source)
trait IntStepper extends Stepper[Int]
A Stepper for Ints. See Stepper.
Companion
object
Source
(source)
object IntStepper
Companion
class
Source
(source)
trait Iterable[+A] extends IterableOnce[A] with IterableOps[A, [A] =>> Iterable[A], Iterable[A]] with IterableFactoryDefaults[A, [A] =>> Iterable[A]]
Base trait for generic collections.
Type Params
A
the element type of the collection
Companion
object
Source
(source)
object Iterable extends Delegate[[A] =>> Iterable[A]]
Companion
class
Source
(source)
trait IterableFactory[+CC <: ([_$1] =>> Any)] extends Serializable
Base trait for companion objects of unconstrained collection types that may require multiple traversals of a source collection to build a target collection CC.
Type Params
CC
Collection type constructor (e.g. List)
Companion
object
Source
(source)
Companion
class
Source
(source)
trait IterableFactoryDefaults[+A, +CC <: ([x] =>> IterableOps[x, CC, CC[x]])] extends IterableOps[A, CC, CC[A]]
This trait provides default implementations for the factory methods fromSpecific and newSpecificBuilder that need to be refined when implementing a collection type that refines the CC and C type parameters.
The default implementations in this trait can be used in the common case when CC[A] is the same as C.
Source
(source)
trait IterableOnce[+A]
A template trait for collections which can be traversed either once only or one or more times.
Note: IterableOnce does not extend IterableOnceOps. This is different than the general design of the collections library, which uses the following pattern:
trait Seq extends Iterable with SeqOps
trait SeqOps extends IterableOps

trait IndexedSeq extends Seq with IndexedSeqOps
trait IndexedSeqOps extends SeqOps
The goal is to provide a minimal interface without any sequential operations. This allows third-party extension like Scala parallel collections to integrate at the level of IterableOnce without inheriting unwanted implementations.
Companion
object
Source
(source)
object IterableOnce
Companion
class
Source
(source)
final class IterableOnceExtensionMethods[A](it: IterableOnce[A]) extends AnyVal
Source
(source)
trait IterableOnceOps[+A, +CC <: ([_$1] =>> Any), +C]
This implementation trait can be mixed into an IterableOnce to get the basic methods that are shared between Iterator and Iterable. The IterableOnce must support multiple calls to iterator but may or may not return the same Iterator every time.
Source
(source)
trait IterableOps[+A, +CC <: ([_$1] =>> Any), +C] extends IterableOnce[A] with IterableOnceOps[A, CC, C]
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 to IterableOps are the same. We cannot express this since we lack variance polymorphism. That's why we have to resort at some places to write C[A @uncheckedVariance].
Type Params
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 a C.
CC
type constructor of the collection (e.g. List, Set). Operations returning a collection with a different type of element B (e.g. map) return a CC[B].
Companion
object
Source
(source)
object IterableOps
Companion
class
Source
(source)
trait Iterator[+A] extends IterableOnce[A] with IterableOnceOps[A, [A] =>> Iterator[A], Iterator[A]]
Iterators are data structures that allow to iterate over a sequence of elements. They have a hasNext method for checking if there is a next element available, and a next method which returns the next element and advances the iterator.
An iterator is mutable: most operations on it change its state. While it is often used to iterate through the elements of a collection, it can also be used without being backed by any collection (see constructors on the companion object).
It is of particular importance to note that, unless stated otherwise, one should never use an iterator after calling a method on it. The two most important exceptions are also the sole abstract methods: next and hasNext.
Both these methods can be called any number of times without having to discard the iterator. Note that even hasNext may cause mutation -- such as when iterating from an input stream, where it will block until the stream is closed or some input becomes available.
Consider this example for safe and unsafe use:
def f[A](it: Iterator[A]) = {
 if (it.hasNext) {            // Safe to reuse "it" after "hasNext"
   it.next()                  // Safe to reuse "it" after "next"
   val remainder = it.drop(2) // it is *not* safe to use "it" again after this line!
   remainder.take(2)          // it is *not* safe to use "remainder" after this line!
 } else it
}
Companion
object
Source
(source)
object Iterator extends IterableFactory[[A] =>> Iterator[A]]
Companion
class
Source
(source)
@deprecated("Use `scala.jdk.CollectionConverters` instead", "2.13.0")
A variety of decorators that enable converting between Scala and Java collections using extension methods, asScala and asJava.
The extension methods return adapters for the corresponding API.
The following conversions are supported via asScala and asJava:
scala.collection.Iterable       <=> java.lang.Iterable
scala.collection.Iterator       <=> java.util.Iterator
scala.collection.mutable.Buffer <=> java.util.List
scala.collection.mutable.Set    <=> java.util.Set
scala.collection.mutable.Map    <=> java.util.Map
scala.collection.concurrent.Map <=> java.util.concurrent.ConcurrentMap
The following conversions are supported via asScala and through specially-named extension methods to convert to Java collections, as shown:
scala.collection.Iterable    <=> java.util.Collection   (via asJavaCollection)
scala.collection.Iterator    <=> java.util.Enumeration  (via asJavaEnumeration)
scala.collection.mutable.Map <=> java.util.Dictionary   (via asJavaDictionary)
In addition, the following one-way conversions are provided via asJava:
scala.collection.Seq         => java.util.List
scala.collection.mutable.Seq => java.util.List
scala.collection.Set         => java.util.Set
scala.collection.Map         => java.util.Map
The following one way conversion is provided via asScala:
java.util.Properties => scala.collection.mutable.Map
In all cases, converting from a source type to a target type and back again will return the original source object. For example:
import scala.collection.JavaConverters._

val source = new scala.collection.mutable.ListBuffer[Int]
val target: java.util.List[Int] = source.asJava
val other: scala.collection.mutable.Buffer[Int] = target.asScala
assert(source eq other)
Alternatively, the conversion methods have descriptive names and can be invoked explicitly.
scala> val vs = java.util.Arrays.asList("hi", "bye")
vs: java.util.List[String] = [hi, bye]

scala> val ss = asScalaIterator(vs.iterator)
ss: Iterator[String] = <iterator>

scala> .toList
res0: List[String] = List(hi, bye)

scala> val ss = asScalaBuffer(vs)
ss: scala.collection.mutable.Buffer[String] = Buffer(hi, bye)
Source
(source)
final class LazyZip2[+El1, +El2, C1]
Decorator representing lazily zipped pairs.
Companion
object
Source
(source)
object LazyZip2
Companion
class
Source
(source)
final class LazyZip3[+El1, +El2, +El3, C1]
Decorator representing lazily zipped triples.
Companion
object
Source
(source)
object LazyZip3
Companion
class
Source
(source)
final class LazyZip4[+El1, +El2, +El3, +El4, C1]
Decorator representing lazily zipped 4-tuples.
Companion
object
Source
(source)
object LazyZip4
Companion
class
Source
(source)
trait LinearSeq[+A] extends Seq[A] with LinearSeqOps[A, [A] =>> LinearSeq[A], LinearSeq[A]] with IterableFactoryDefaults[A, [A] =>> LinearSeq[A]]
Base trait for linearly accessed sequences that have efficient head and tail operations. Known subclasses: List, LazyList
Companion
object
Source
(source)
object LinearSeq extends Delegate[[A] =>> LinearSeq[A]]
Companion
class
Source
(source)
trait LinearSeqOps[+A, +CC <: ([X] =>> LinearSeq[X]), +C <: LinearSeq[A] & LinearSeqOps[A, CC, C]] extends SeqOps[A, CC, C]
Base trait for linear Seq operations
Source
(source)
trait LongStepper extends Stepper[Long]
A Stepper for Longs. See Stepper.
Companion
object
Source
(source)
object LongStepper
Companion
class
Source
(source)
trait Map[K, +V] extends Iterable[(K, V)] with MapOps[K, V, [K, V] =>> Map[K, V], Map[K, V]] with MapFactoryDefaults[K, V, [K, V] =>> Map[K, V], [A] =>> Iterable[A]] with Equals
Base Map type
Companion
object
Source
(source)
object Map extends Delegate[[K, V] =>> Map[K, V]]
This object provides a set of operations to create Map values.
Companion
class
Source
(source)
trait MapFactory[+CC <: ([_$20, _$21] =>> Any)] extends Serializable
Companion
object
Source
(source)
object MapFactory
Companion
class
Source
(source)
trait MapFactoryDefaults[K, +V, +CC <: ([x, y] =>> IterableOps[(x, y), [A] =>> Iterable[A], Iterable[(x, y)]]), +WithFilterCC <: ([x] =>> IterableOps[x, WithFilterCC, WithFilterCC[x]] & Iterable[x])] extends MapOps[K, V, CC, CC[K, V]] with IterableOps[(K, V), WithFilterCC, CC[K, V]]
This trait provides default implementations for the factory methods fromSpecific and newSpecificBuilder that need to be refined when implementing a collection type that refines the CC and C type parameters. It is used for maps.
Note that in maps, the CC type of the map is not the same as the CC type for the underlying iterable (which is fixed to Map in MapOps). This trait has therefore two type parameters CC and WithFilterCC. The withFilter method inherited from IterableOps is overridden with a compatible default implementation.
The default implementations in this trait can be used in the common case when CC[A] is the same as C.
Source
(source)
trait MapOps[K, +V, +CC <: ([_$1, _$2] =>> IterableOps[, AnyConstr, ]), +C] extends IterableOps[(K, V), [A] =>> Iterable[A], C] with PartialFunction[K, V]
Base Map implementation type
Type Params
C
type of the map (e.g. HashMap[Int, String]). Operations returning a collection with the same type of element (e.g. drop, filter) return a C.
CC
type constructor of the map (e.g. HashMap). Operations returning a collection with a different type of entries (L, W) (e.g. map) return a CC[L, W].
K
Type of keys
V
Type of values
Companion
object
Source
(source)
object MapOps
Companion
class
Source
(source)
trait MapView[K, +V] extends MapOps[K, V, <none>, View[(K, V)]] with View[(K, V)]
Companion
object
Source
(source)
object MapView extends MapViewFactory
Companion
class
Source
(source)
trait MapViewFactory extends MapFactory[<none>]
Source
(source)
object Searching
Source
(source)
trait Seq[+A] extends Iterable[A] with PartialFunction[Int, A] with SeqOps[A, [A] =>> Seq[A], Seq[A]] with IterableFactoryDefaults[A, [A] =>> Seq[A]] with Equals
Base trait for sequence collections
Type Params
A
the element type of the collection
Companion
object
Source
(source)
object Seq extends Delegate[[A] =>> Seq[A]]
This object provides a set of operations to create Seq values.
Companion
class
Source
(source)
trait SeqFactory[+CC <: ([A] =>> SeqOps[A, [A] =>> Seq[A], Seq[A]])] extends IterableFactory[CC]
Type Params
CC
Collection type constructor (e.g. List)
Companion
object
Source
(source)
object SeqFactory
Companion
class
Source
(source)
trait SeqMap[K, +V] extends Map[K, V] with MapOps[K, V, [K, V] =>> SeqMap[K, V], SeqMap[K, V]] with MapFactoryDefaults[K, V, [K, V] =>> SeqMap[K, V], [A] =>> Iterable[A]]
A generic trait for ordered maps. Concrete classes have to provide functionality for the abstract methods in SeqMap.
Note that when checking for equality SeqMap does not take into account ordering.
Type Params
K
the type of the keys contained in this linked map.
V
the type of the values associated with the keys in this linked map.
Companion
object
Source
(source)
object SeqMap extends Delegate[[K, V] =>> SeqMap[K, V]]
Companion
class
Source
(source)
trait SeqOps[+A, +CC <: ([_$1] =>> Any), +C] extends IterableOps[A, CC, C]
Base trait for Seq operations
Type Params
A
the element type of the collection
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 a C.
CC
type constructor of the collection (e.g. List, Set). Operations returning a collection with a different type of element B (e.g. map) return a CC[B].
Companion
object
Source
(source)
object SeqOps
Companion
class
Source
(source)
trait SeqView[+A] extends SeqOps[A, [A] =>> View[A], View[A]] with View[A]
Companion
object
Source
(source)
object SeqView
Companion
class
Source
(source)
trait Set[A] extends Iterable[A] with SetOps[A, [A] =>> Set[A], Set[A]] with Equals with IterableFactoryDefaults[A, [A] =>> Set[A]]
Base trait for set collections.
Companion
object
Source
(source)
object Set extends Delegate[[A] =>> Set[A]]
This object provides a set of operations to create Set values.
Companion
class
Source
(source)
trait SetOps[A, +CC <: ([_$1] =>> Any), +C <: SetOps[A, CC, C]] extends IterableOps[A, CC, C] with A => Boolean
Base trait for set operations
Source
(source)
trait SortedIterableFactory[+CC <: ([_$42] =>> Any)] extends EvidenceIterableFactory[CC, Ordering]
Base trait for companion objects of collections that require an implicit Ordering.
Type Params
CC
Collection type constructor (e.g. SortedSet)
Companion
object
Source
(source)
Companion
class
Source
(source)
trait SortedMap[K, +V] extends Map[K, V] with SortedMapOps[K, V, [K, V] =>> SortedMap[K, V], SortedMap[K, V]] with SortedMapFactoryDefaults[K, V, [K, V] =>> SortedMap[K, V], [A] =>> Iterable[A], [K, V] =>> Map[K, V]]
A Map whose keys are sorted according to a scala.math.Ordering
Companion
object
Source
(source)
object SortedMap extends Delegate[[K, V] =>> SortedMap[K, V]]
Companion
class
Source
(source)
trait SortedMapFactory[+CC <: ([_$57, _$58] =>> Any)] extends Serializable
Companion
object
Source
(source)
Companion
class
Source
(source)
trait SortedMapFactoryDefaults[K, +V, +CC <: ([x, y] =>> Map[x, y] & SortedMapOps[x, y, CC, CC[x, y]] & UnsortedCC[x, y]), +WithFilterCC <: ([x] =>> IterableOps[x, WithFilterCC, WithFilterCC[x]] & Iterable[x]), +UnsortedCC <: ([x, y] =>> Map[x, y])] extends SortedMapOps[K, V, CC, CC[K, V]] with MapOps[K, V, UnsortedCC, CC[K, V]]
This trait provides default implementations for the factory methods fromSpecific and newSpecificBuilder that need to be refined when implementing a collection type that refines the CC and C type parameters. It is used for sorted maps.
Note that in sorted maps, the CC type of the map is not the same as the CC type for the underlying map (which is fixed to Map in SortedMapOps). This trait has therefore three type parameters CC, WithFilterCC and UnsortedCC. The withFilter method inherited from IterableOps is overridden with a compatible default implementation.
The default implementations in this trait can be used in the common case when CC[A] is the same as C.
Source
(source)
trait SortedMapOps[K, +V, +CC <: ([X, Y] =>> Map[X, Y] & SortedMapOps[X, Y, CC, ]), +C <: SortedMapOps[K, V, CC, C]] extends MapOps[K, V, [K, V] =>> Map[K, V], C] with SortedOps[K, C]
Companion
object
Source
(source)
object SortedMapOps
Companion
class
Source
(source)
trait SortedOps[A, +C]
Base trait for sorted collections
Source
(source)
trait SortedSet[A] extends Set[A] with SortedSetOps[A, [A] =>> SortedSet[A], SortedSet[A]] with SortedSetFactoryDefaults[A, [A] =>> SortedSet[A], [A] =>> Set[A]]
Base type of sorted sets
Companion
object
Source
(source)
object SortedSet extends Delegate[[A] =>> SortedSet[A]]
Companion
class
Source
(source)
trait SortedSetFactoryDefaults[+A, +CC <: ([X] =>> SortedSet[X] & SortedSetOps[X, CC, CC[X]]), +WithFilterCC <: ([x] =>> IterableOps[x, WithFilterCC, WithFilterCC[x]] & Set[x])] extends SortedSetOps[A, CC, CC[A]]
This trait provides default implementations for the factory methods fromSpecific and newSpecificBuilder that need to be refined when implementing a collection type that refines the CC and C type parameters. It is used for sorted sets.
Note that in sorted sets, the CC type of the set is not the same as the CC type for the underlying iterable (which is fixed to Set in SortedSetOps). This trait has therefore two type parameters CC and WithFilterCC. The withFilter method inherited from IterableOps is overridden with a compatible default implementation.
The default implementations in this trait can be used in the common case when CC[A] is the same as C.
Source
(source)
trait SortedSetOps[A, +CC <: ([X] =>> SortedSet[X]), +C <: SortedSetOps[A, CC, C]] extends SetOps[A, [A] =>> Set[A], C] with SortedOps[A, C]
Companion
object
Source
(source)
object SortedSetOps
Companion
class
Source
(source)
trait SpecificIterableFactory[-A, +C] extends Factory[A, C]
Type Params
A
Type of elements (e.g. Int, Boolean, etc.)
C
Type of collection (e.g. List[Int], TreeMap[Int, String], etc.)
Source
(source)
Steppers exist to enable creating Java streams over Scala collections, see scala.jdk.StreamConverters. Besides that use case, they allow iterating over collections holding unboxed primitives (e.g., Array[Int]) without boxing the elements.
Steppers have an iterator-like interface with methods hasStep and nextStep(). The difference to iterators - and the reason Stepper is not a subtype of Iterator - is that there are hand-specialized variants of Stepper for Int, Long and Double (IntStepper, etc.). These enable iterating over collections holding unboxed primitives (e.g., Arrays, scala.jdk.Accumulators) without boxing the elements.
The selection of primitive types (Int, Long and Double) matches the hand-specialized variants of Java Streams (java.util.stream.Stream, java.util.stream.IntStream, etc.) and the corresponding Java Spliterators (java.util.Spliterator, java.util.Spliterator.OfInt, etc.).
Steppers can be converted to Scala Iterators, Java Iterators and Java Spliterators. Primitive Steppers are converted to the corresponding primitive Java Iterators and Spliterators.
Type Params
A
the element type of the Stepper
Companion
object
Source
(source)
object Stepper
Companion
class
Source
(source)
sealed trait StepperShape[-T, S <: Stepper[]]
An implicit StepperShape instance is used in the IterableOnce.stepper to return a possibly specialized Stepper S according to the element type T.
Companion
object
Source
(source)
trait StrictOptimizedClassTagSeqFactory[+CC <: ([A] =>> SeqOps[A, [A] =>> Seq[A], Seq[A]])] extends ClassTagSeqFactory[CC]
Source
(source)
trait StrictOptimizedIterableOps[+A, +CC <: ([_$1] =>> Any), +C] extends IterableOps[A, CC, C]
Trait that overrides iterable operations to take advantage of strict builders.
Type Params
A
Elements type
C
Collection type
CC
Collection type constructor
Source
(source)
trait StrictOptimizedLinearSeqOps[+A, +CC <: ([X] =>> LinearSeq[X]), +C <: LinearSeq[A] & StrictOptimizedLinearSeqOps[A, CC, C]] extends LinearSeqOps[A, CC, C] with StrictOptimizedSeqOps[A, CC, C]
Source
(source)
trait StrictOptimizedMapOps[K, +V, +CC <: ([_$1, _$2] =>> IterableOps[, AnyConstr, ]), +C] extends MapOps[K, V, CC, C] with StrictOptimizedIterableOps[(K, V), [A] =>> Iterable[A], C]
Trait that overrides map operations to take advantage of strict builders.
Type Params
C
Collection type
CC
Collection type constructor
K
Type of keys
V
Type of values
Source
(source)
trait StrictOptimizedSeqFactory[+CC <: ([A] =>> SeqOps[A, [A] =>> Seq[A], Seq[A]])] extends SeqFactory[CC]
Source
(source)
trait StrictOptimizedSeqOps[+A, +CC <: ([_$1] =>> Any), +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.
Source
(source)
trait StrictOptimizedSetOps[A, +CC <: ([_$1] =>> Any), +C <: SetOps[A, CC, C]] extends SetOps[A, CC, C] with StrictOptimizedIterableOps[A, CC, C]
Trait that overrides set operations to take advantage of strict builders.
Type Params
A
Elements type
C
Collection type
CC
Collection type constructor
Source
(source)
trait StrictOptimizedSortedMapOps[K, +V, +CC <: ([X, Y] =>> Map[X, Y] & SortedMapOps[X, Y, CC, ]), +C <: SortedMapOps[K, V, CC, C]] extends SortedMapOps[K, V, CC, C] with StrictOptimizedMapOps[K, V, [K, V] =>> Map[K, V], C]
Trait that overrides sorted map operations to take advantage of strict builders.
Type Params
C
Collection type
CC
Collection type constructor
K
Type of keys
V
Type of values
Source
(source)
trait StrictOptimizedSortedSetOps[A, +CC <: ([X] =>> SortedSet[X]), +C <: SortedSetOps[A, CC, C]] extends SortedSetOps[A, CC, C] with StrictOptimizedSetOps[A, [A] =>> Set[A], C]
Trait that overrides sorted set operations to take advantage of strict builders.
Type Params
A
Elements type
C
Collection type
CC
Collection type constructor
Source
(source)
object StringOps
Companion
class
Source
(source)
final class StringOps(s: String) extends AnyVal
Companion
object
Source
(source)
final case class StringView(s: String) extends AbstractIndexedSeqView[Char]
Source
(source)
trait View[+A] extends Iterable[A] with IterableOps[A, [A] =>> View[A], View[A]] with IterableFactoryDefaults[A, [A] =>> View[A]] with Serializable
Views are collections whose transformation operations are non strict: the resulting elements are evaluated only when the view is effectively traversed (e.g. using foreach or foldLeft), or when the view is converted to a strict collection type (using the to operation).
Companion
object
Source
(source)
object View extends IterableFactory[[A] =>> View[A]]
This object reifies operations on views as case classes
Companion
class
Source
(source)
abstract class WithFilter[+A, +CC <: ([_$1] =>> Any)] extends Serializable
A template trait that contains just the map, flatMap, foreach and withFilter methods of trait Iterable.
Type Params
A
Element type (e.g. Int)
CC
Collection type constructor (e.g. List)
Source
(source)

Types

@deprecated("Use SeqOps (for the methods) or IndexedSeqOps (for fast indexed access) instead of ArrayLike", "2.13.0")
type ArrayLike[A] = SeqOps[A, [A] =>> Seq[A], Seq[A]]
Source
(source)
@deprecated("Gen* collection types have been removed", "2.13.0")
type GenIterable[+X] = Iterable[X]
Source
(source)
@deprecated("Gen* collection types have been removed", "2.13.0")
type GenMap[K, +V] = Map[K, V]
Source
(source)
@deprecated("Gen* collection types have been removed", "2.13.0")
type GenSeq[+X] = Seq[X]
Source
(source)
@deprecated("Gen* collection types have been removed", "2.13.0")
type GenSet[X] = Set[X]
Source
(source)
@deprecated("Gen* collection types have been removed", "2.13.0")
Source
(source)
@deprecated("Gen* collection types have been removed", "2.13.0")
Source
(source)
@deprecated("Use SeqOps instead of SeqLike", "2.13.0")
type SeqLike[A, T] = SeqOps[A, [A] =>> Seq[A], T]
Source
(source)
@deprecated("Use Iterable instead of Traversable", "2.13.0")
type Traversable[+X] = Iterable[X]
Source
(source)
@deprecated("Use IterableOnce instead of TraversableOnce", "2.13.0")
Source
(source)

Value members

Fields

@deprecated("Gen* collection types have been removed", "2.13.0")
Source
(source)
@deprecated("Gen* collection types have been removed", "2.13.0")
val GenMap: Map
Source
(source)
@deprecated("Gen* collection types have been removed", "2.13.0")
val GenSeq: Seq
Source
(source)
@deprecated("Gen* collection types have been removed", "2.13.0")
val GenSet: Set
Source
(source)
@deprecated("Gen* collection types have been removed", "2.13.0")
Source
(source)
@deprecated("Gen* collection types have been removed", "2.13.0")
Source
(source)
@deprecated("Use Iterable instead of Traversable", "2.13.0")
Source
(source)
@deprecated("Use IterableOnce instead of TraversableOnce", "2.13.0")
Source
(source)