scala.collection

# immutable

#### package immutable

Content Hierarchy Learn more about scaladoc diagrams
Visibility

1. Public
2. All

### Type Members

1. #### final case class ::[B](head: B, tl: List[B]) extends List[B] with Product with Serializable

   A non empty list characterized by a head and a tail.

2. #### abstract class AbstractMap[A, +B] extends collection.AbstractMap[A, B] with Map[A, B]

   Explicit instantiation of the `Map` trait to reduce class file size in subclasses.

3. #### abstract class BitSet extends AbstractSet[Int] with SortedSet[Int] with collection.BitSet with BitSetLike[BitSet] with Serializable

   A class for immutable bitsets.

4. #### trait DefaultMap[A, +B] extends Map[A, B]

   A default map which implements the `+` and `-` methods of maps.

5. #### class HashMap[A, +B] extends AbstractMap[A, B] with Map[A, B] with MapLike[A, B, HashMap[A, B]] with Serializable with CustomParallelizable[(A, B), ParHashMap[A, B]]

   This class implements immutable maps using a hash trie.

6. #### class HashSet[A] extends AbstractSet[A] with Set[A] with GenericSetTemplate[A, HashSet] with SetLike[A, HashSet[A]] with CustomParallelizable[A, ParHashSet[A]] with Serializable

   This class implements immutable sets using a hash trie.

7. #### trait IndexedSeq[+A] extends Seq[A] with collection.IndexedSeq[A] with GenericTraversableTemplate[A, IndexedSeq] with IndexedSeqLike[A, IndexedSeq[A]]

   A subtrait of `collection.IndexedSeq` which represents indexed sequences that are guaranteed immutable.

8. #### sealed abstract class IntMap[+T] extends AbstractMap[immutable.IntMapUtils.Int, T] with Map[immutable.IntMapUtils.Int, T] with MapLike[immutable.IntMapUtils.Int, T, IntMap[T]]

   Specialised immutable map structure for integer keys, based on Fast Mergeable Integer Maps by Okasaki and Gill.

9. #### trait Iterable[+A] extends Traversable[A] with collection.Iterable[A] with GenericTraversableTemplate[A, Iterable] with IterableLike[A, Iterable[A]] with Parallelizable[A, ParIterable[A]]

   A base trait for iterable collections that are guaranteed immutable.

10. #### trait LinearSeq[+A] extends Seq[A] with collection.LinearSeq[A] with GenericTraversableTemplate[A, LinearSeq] with LinearSeqLike[A, LinearSeq[A]]

    A subtrait of `collection.LinearSeq` which represents sequences that are guaranteed immutable.

11. #### sealed abstract class List[+A] extends AbstractSeq[A] with LinearSeq[A] with Product with GenericTraversableTemplate[A, List] with LinearSeqOptimized[A, List[A]] with java.io.Serializable

    A class for immutable linked lists representing ordered collections of elements of type.

12. #### class ListMap[A, +B] extends AbstractMap[A, B] with Map[A, B] with MapLike[A, B, ListMap[A, B]] with Serializable

    This class implements immutable maps using a list-based data structure.

13. #### class ListSet[A] extends AbstractSet[A] with Set[A] with GenericSetTemplate[A, ListSet] with SetLike[A, ListSet[A]] with Serializable

    This class implements immutable sets using a list-based data structure.

14. #### sealed abstract class LongMap[+T] extends AbstractMap[immutable.LongMapUtils.Long, T] with Map[immutable.LongMapUtils.Long, T] with MapLike[immutable.LongMapUtils.Long, T, LongMap[T]]

    Specialised immutable map structure for long keys, based on Fast Mergeable Long Maps by Okasaki and Gill.

15. #### trait Map[A, +B] extends Iterable[(A, B)] with collection.Map[A, B] with MapLike[A, B, Map[A, B]]

    A generic trait for immutable maps.

16. #### trait MapLike[A, +B, +This <: MapLike[A, B, This] with Map[A, B]] extends collection.MapLike[A, B, This] with Parallelizable[(A, B), ParMap[A, B]]

    A generic template for immutable maps from keys of type `A` to values of type `B`.

17. #### abstract class NumericRange[T] extends AbstractSeq[T] with IndexedSeq[T] with Serializable

    `NumericRange` is a more generic version of the `Range` class which works with arbitrary types.

18. #### class PagedSeq[T] extends AbstractSeq[T] with collection.IndexedSeq[T]

    An implementation of lazily computed sequences, where elements are stored in "pages", i.

19. #### class Queue[+A] extends AbstractSeq[A] with LinearSeq[A] with GenericTraversableTemplate[A, Queue] with LinearSeqLike[A, Queue[A]] with Serializable

    `Queue` objects implement data structures that allow to insert and retrieve elements in a first-in-first-out (FIFO) manner.

20. #### class Range extends AbstractSeq[Int] with IndexedSeq[Int] with CustomParallelizable[Int, ParRange] with Serializable

    The `Range` class represents integer values in range [start;end) with non-zero step value `step`.

21. #### trait Seq[+A] extends Iterable[A] with collection.Seq[A] with GenericTraversableTemplate[A, Seq] with SeqLike[A, Seq[A]] with Parallelizable[A, ParSeq[A]]

    A subtrait of `collection.Seq` which represents sequences that are guaranteed immutable.

22. #### trait Set[A] extends Iterable[A] with collection.Set[A] with GenericSetTemplate[A, Set] with SetLike[A, Set[A]] with Parallelizable[A, ParSet[A]]

    A generic trait for immutable sets.

23. #### trait SortedMap[A, +B] extends Map[A, B] with collection.SortedMap[A, B] with MapLike[A, B, SortedMap[A, B]] with SortedMapLike[A, B, SortedMap[A, B]]

    A map whose keys are sorted.

24. #### trait SortedSet[A] extends Set[A] with collection.SortedSet[A] with SortedSetLike[A, SortedSet[A]]

    A subtrait of `collection.SortedSet` which represents sorted sets which cannot be mutated.

25. #### abstract class Stream[+A] extends AbstractSeq[A] with LinearSeq[A] with GenericTraversableTemplate[A, Stream] with LinearSeqOptimized[A, Stream[A]] with Serializable

    The class `Stream` implements lazy lists where elements are only evaluated when they are needed.

26. #### final class StreamIterator[+A] extends AbstractIterator[A] with Iterator[A]

    A specialized, extra-lazy implementation of a stream iterator, so it can iterate as lazily as it traverses the tail.

27. #### trait StreamView[+A, +Coll] extends StreamViewLike[A, Coll, StreamView[A, Coll]]

28. #### trait StreamViewLike[+A, +Coll, +This <: StreamView[A, Coll] with StreamViewLike[A, Coll, This]] extends SeqView[A, Coll] with SeqViewLike[A, Coll, This]

29. #### trait StringLike[+Repr] extends IndexedSeqOptimized[Char, Repr] with Ordered[String]

    A trait describing stringlike collections.

30. #### final class StringOps extends AnyVal with StringLike[String]

    This class serves as a wrapper providing `String`s with all the operations found in indexed sequences.

31. #### trait Traversable[+A] extends collection.Traversable[A] with GenericTraversableTemplate[A, Traversable] with TraversableLike[A, Traversable[A]] with Immutable

    A trait for traversable collections that are guaranteed immutable.

32. #### class TreeMap[A, +B] extends SortedMap[A, B] with SortedMapLike[A, B, TreeMap[A, B]] with MapLike[A, B, TreeMap[A, B]] with Serializable

    This class implements immutable maps using a tree.

33. #### class TreeSet[A] extends SortedSet[A] with SortedSetLike[A, TreeSet[A]] with Serializable

    This class implements immutable sets using a tree.

34. #### final class Vector[+A] extends AbstractSeq[A] with IndexedSeq[A] with GenericTraversableTemplate[A, Vector] with IndexedSeqLike[A, Vector[A]] with VectorPointer[A] with Serializable with CustomParallelizable[A, ParVector[A]]

    Vector is a general-purpose, immutable data structure.

35. #### final class VectorBuilder[A] extends Builder[A, Vector[A]] with VectorPointer[A]

36. #### class VectorIterator[+A] extends AbstractIterator[A] with Iterator[A] with VectorPointer[A]

37. #### class WrappedString extends AbstractSeq[Char] with IndexedSeq[Char] with StringLike[WrappedString]

    This class serves as a wrapper augmenting `String`s with all the operations found in indexed sequences.

38. #### trait MapProxy[A, +B] extends Map[A, B] with MapProxyLike[A, B, Map[A, B]]

    This is a simple wrapper class for `scala.collection.immutable.Map`.

39. #### trait SetProxy[A] extends Set[A] with SetProxyLike[A, Set[A]]

    This is a simple wrapper class for `scala.collection.immutable.Set`.

40. #### class Stack[+A] extends AbstractSeq[A] with LinearSeq[A] with GenericTraversableTemplate[A, Stack] with LinearSeqOptimized[A, Stack[A]] with Serializable

    This class implements immutable stacks using a list-based data structure.

### Value Members

1. #### object BitSet extends BitSetFactory[BitSet] with Serializable

   This object provides a set of operations to create ``immutable.BitSet`` values.

2. #### object HashMap extends ImmutableMapFactory[HashMap] with generic.BitOperations.Int with Serializable

   This object provides a set of operations needed to create ``immutable.HashMap`` values.

3. #### object HashSet extends ImmutableSetFactory[HashSet] with Serializable

   This object provides a set of operations needed to create ``immutable.HashSet`` values.

4. #### object IndexedSeq extends IndexedSeqFactory[IndexedSeq]

   This object provides a set of operations to create ``IndexedSeq`` values.

5. #### object IntMap

   A companion object for integer maps.

6. #### object Iterable extends GenTraversableFactory[Iterable] with TraversableFactory[Iterable]

   This object provides a set of operations to create ``immutable.Iterable`` values.

7. #### object LinearSeq extends SeqFactory[LinearSeq]

   This object provides a set of operations to create ``immutable.LinearSeq`` values.

8. #### object List extends SeqFactory[List] with Serializable

   This object provides a set of operations to create ``List`` values.

9. #### object ListMap extends ImmutableMapFactory[ListMap] with Serializable

   This object provides a set of operations needed to create `immutable.ListMap` values.

10. #### object ListSet extends ImmutableSetFactory[ListSet] with Serializable

    This object provides a set of operations needed to create `immutable.ListSet` values.

11. #### object LongMap

    A companion object for long maps.

12. #### object Map extends ImmutableMapFactory[Map]

    This object provides a set of operations needed to create ``immutable.Map`` values.

13. #### object Nil extends List[Nothing] with Product with Serializable

    The empty list.

14. #### object NumericRange extends Serializable

    A companion object for numeric ranges.

15. #### object PagedSeq

    The `PagedSeq` object defines a lazy implementations of a random access sequence.

16. #### object Queue extends SeqFactory[Queue] with Serializable

    This object provides a set of operations to create ``immutable.Queue`` values.

17. #### object Range extends Serializable

    A companion object for the `Range` class.

18. #### object Seq extends SeqFactory[Seq]

    This object provides a set of operations to create ``immutable.Seq`` values.

19. #### object Set extends ImmutableSetFactory[Set]

    This object provides a set of operations needed to create ``immutable.Set`` values.

20. #### object SortedMap extends ImmutableSortedMapFactory[SortedMap]

    This object provides a set of operations needed to create sorted maps of type `immutable.SortedMap`.

21. #### object SortedSet extends ImmutableSortedSetFactory[SortedSet]

    This object provides a set of operations needed to create sorted sets of type ``immutable.SortedSet``.

22. #### object Stack extends SeqFactory[Stack] with Serializable

    This object provides a set of operations to create ``immutable.Stack`` values.

23. #### object Stream extends SeqFactory[Stream] with Serializable

    The object `Stream` provides helper functions to manipulate streams.

24. #### object StringLike

    A companion object for the `StringLike` containing some constants.

25. #### object Traversable extends GenTraversableFactory[Traversable] with TraversableFactory[Traversable]

    This object provides a set of operations to create ``immutable.Traversable`` values.

26. #### object TreeMap extends ImmutableSortedMapFactory[TreeMap] with Serializable

    This object provides a set of operations needed to create sorted maps of type `immutable.TreeMap`.

27. #### object TreeSet extends ImmutableSortedSetFactory[TreeSet] with Serializable

    This object provides a set of operations needed to create sorted sets of type ``immutable.TreeSet``.

28. #### object Vector extends IndexedSeqFactory[Vector] with Serializable

    Companion object to the Vector class

29. #### object WrappedString

    A companion object for wrapped strings.

### Ungrouped