scala.collection

# mutable

#### package mutable

Visibility

1. Public
2. All

### Type Members

1. #### class ArrayBuffer[A] extends AbstractBuffer[A] with Buffer[A] with GenericTraversableTemplate[A, ArrayBuffer] with BufferLike[A, ArrayBuffer[A]] with IndexedSeqOptimized[A, ArrayBuffer[A]] with Builder[A, ArrayBuffer[A]] with ResizableArray[A] with CustomParallelizable[A, ParArray[A]] with Serializable

   An implementation of the `Buffer` class using an array to represent the assembled sequence internally.

2. #### abstract class ArrayBuilder[T] extends Builder[T, Array[T]] with Serializable

   A builder class for arrays.

3. #### trait ArrayLike[A, +Repr] extends IndexedSeqOptimized[A, Repr]

   A common supertrait of `ArrayOps` and `WrappedArray` that factors out most operations on arrays and wrapped arrays.

4. #### abstract class ArrayOps[T] extends ArrayLike[T, Array[T]] with CustomParallelizable[T, ParArray[T]]

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

5. #### class ArraySeq[A] extends AbstractSeq[A] with IndexedSeq[A] with GenericTraversableTemplate[A, ArraySeq] with IndexedSeqOptimized[A, ArraySeq[A]] with CustomParallelizable[A, ParArray[A]] with Serializable

   A class for polymorphic arrays of elements that's represented internally by an array of objects.

6. #### class ArrayStack[T] extends AbstractSeq[T] with Seq[T] with SeqLike[T, ArrayStack[T]] with GenericTraversableTemplate[T, ArrayStack] with Cloneable[ArrayStack[T]] with Builder[T, ArrayStack[T]] with Serializable

   Simple stack class backed by an array.

7. #### class BitSet extends AbstractSet[Int] with SortedSet[Int] with BitSet with BitSetLike[BitSet] with SetLike[Int, BitSet] with Serializable

   A class for mutable bitsets.

8. #### trait Buffer[A] extends Seq[A] with GenericTraversableTemplate[A, Buffer] with BufferLike[A, Buffer[A]]

   Buffers are used to create sequences of elements incrementally by appending, prepending, or inserting new elements.

9. #### trait BufferLike[A, +This <: BufferLike[A, This] with Buffer[A]] extends Growable[A] with Shrinkable[A] with Scriptable[A] with Subtractable[A, This] with SeqLike[A, This]

   A template trait for buffers of type `Buffer[A]`.

10. #### trait BufferProxy[A] extends Buffer[A] with Proxy

    This is a simple proxy class for `scala.collection.mutable.Buffer`.

11. #### trait Builder[-Elem, +To] extends Growable[Elem]

    The base trait of all builders.

12. #### trait Cloneable[+A <: AnyRef] extends AnyRef

    A trait for cloneable collections.

13. #### trait ConcurrentMap[A, B] extends Map[A, B]

    A template trait for mutable maps that allow concurrent access.

14. #### final class Ctrie[K, V] extends ConcurrentMap[K, V] with MapLike[K, V, Ctrie[K, V]] with CustomParallelizable[(K, V), ParCtrie[K, V]] with Serializable

    A concurrent hash-trie or Ctrie is a concurrent thread-safe lock-free implementation of a hash array mapped trie.

15. #### final class DefaultEntry[A, B] extends HashEntry[A, DefaultEntry[A, B]] with Serializable

    Class used internally for default map model.

16. #### trait DefaultMapModel[A, B] extends Map[A, B]

    This class is used internally.

17. #### class DoubleLinkedList[A] extends AbstractSeq[A] with LinearSeq[A] with GenericTraversableTemplate[A, DoubleLinkedList] with DoubleLinkedListLike[A, DoubleLinkedList[A]] with Serializable

    This class implements double linked lists where both the head (`elem`), the tail (`next`) and a reference to the previous node (`prev`) are mutable.

18. #### trait DoubleLinkedListLike[A, This <: Seq[A] with DoubleLinkedListLike[A, This]] extends SeqLike[A, This] with LinkedListLike[A, This]

    This extensible class may be used as a basis for implementing double linked lists.

19. #### trait FlatHashTable[A] extends HashUtils[A]

    An implementation class backing a `HashSet`.

20. #### class GrowingBuilder[Elem, To <: Growable[Elem]] extends Builder[Elem, To]

    The canonical builder for collections that are growable, i.

21. #### trait HashEntry[A, E] extends AnyRef

    Class used internally.

22. #### class HashMap[A, B] extends AbstractMap[A, B] with Map[A, B] with MapLike[A, B, HashMap[A, B]] with HashTable[A, DefaultEntry[A, B]] with CustomParallelizable[(A, B), ParHashMap[A, B]] with Serializable

    This class implements mutable maps using a hashtable.

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

    This class implements mutable sets using a hashtable.

24. #### trait HashTable[A, Entry >: Null <: HashEntry[A, Entry]] extends HashUtils[A]

    This class can be used to construct data structures that are based on hashtables.

25. #### class History[Evt, Pub] extends AbstractIterable[(Pub, Evt)] with Subscriber[Evt, Pub] with Iterable[(Pub, Evt)] with Serializable

    `History[A, B]` objects may subscribe to events of type `A` published by an object of type `B`.

26. #### class ImmutableMapAdaptor[A, B] extends AbstractMap[A, B] with Map[A, B] with Serializable

    This class can be used as an adaptor to create mutable maps from immutable map implementations.

27. #### class ImmutableSetAdaptor[A] extends AbstractSet[A] with Set[A] with Serializable

    This class can be used as an adaptor to create mutable sets from immutable set implementations.

28. #### trait IndexedSeq[A] extends Seq[A] with IndexedSeq[A] with GenericTraversableTemplate[A, IndexedSeq] with IndexedSeqLike[A, IndexedSeq[A]]

    A subtrait of `collection.IndexedSeq` which represents sequences that can be mutated.

29. #### trait IndexedSeqLike[A, +Repr] extends IndexedSeqLike[A, Repr]

    A subtrait of scala.

30. #### trait IndexedSeqOptimized[A, +Repr] extends IndexedSeqLike[A, Repr] with IndexedSeqOptimized[A, Repr]

    A subtrait of scala.

31. #### trait IndexedSeqView[A, +Coll] extends IndexedSeq[A] with IndexedSeqOptimized[A, IndexedSeqView[A, Coll]] with SeqView[A, Coll] with SeqViewLike[A, Coll, IndexedSeqView[A, Coll]]

    A non-strict view of a mutable `IndexedSeq`.

32. #### trait Iterable[A] extends Traversable[A] with Iterable[A] with GenericTraversableTemplate[A, Iterable] with IterableLike[A, Iterable[A]] with Parallelizable[A, ParIterable[A]]

    A base trait for iterable collections that can be mutated.

33. #### abstract class LazyBuilder[Elem, +To] extends Builder[Elem, To]

    A builder that constructs its result lazily.

34. #### trait LinearSeq[A] extends Seq[A] with LinearSeq[A] with GenericTraversableTemplate[A, LinearSeq] with LinearSeqLike[A, LinearSeq[A]]

    A subtrait of `collection.LinearSeq` which represents sequences that can be mutated.

35. #### final class LinkedEntry[A, B] extends HashEntry[A, LinkedEntry[A, B]] with Serializable

    Class for the linked hash map entry, used internally.

36. #### class LinkedHashMap[A, B] extends AbstractMap[A, B] with Map[A, B] with MapLike[A, B, LinkedHashMap[A, B]] with HashTable[A, LinkedEntry[A, B]] with Serializable

    This class implements mutable maps using a hashtable.

37. #### class LinkedHashSet[A] extends AbstractSet[A] with Set[A] with GenericSetTemplate[A, LinkedHashSet] with SetLike[A, LinkedHashSet[A]] with FlatHashTable[A] with Serializable

    This class implements mutable sets using a hashtable.

38. #### class LinkedList[A] extends AbstractSeq[A] with LinearSeq[A] with GenericTraversableTemplate[A, LinkedList] with LinkedListLike[A, LinkedList[A]] with Serializable

    A more traditional/primitive style of linked list where the "list" is also the "head" link.

39. #### trait LinkedListLike[A, This <: Seq[A] with LinkedListLike[A, This]] extends SeqLike[A, This]

    This extensible class may be used as a basis for implementing linked list.

40. #### final class ListBuffer[A] extends AbstractBuffer[A] with Buffer[A] with GenericTraversableTemplate[A, ListBuffer] with BufferLike[A, ListBuffer[A]] with Builder[A, List[A]] with SeqForwarder[A] with Serializable

    A `Buffer` implementation back up by a list.

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

    A simple mutable map backed by a list.

42. #### trait Map[A, B] extends Iterable[(A, B)] with Map[A, B] with MapLike[A, B, Map[A, B]]

    A base trait for maps that can be mutated.

43. #### class MapBuilder[A, B, Coll <: GenMap[A, B] with GenMapLike[A, B, Coll]] extends Builder[(A, B), Coll]

    The canonical builder for immutable maps, working with the map's `+` method to add new elements.

44. #### trait MapLike[A, B, +This <: MapLike[A, B, This] with Map[A, B]] extends MapLike[A, B, This] with Builder[(A, B), This] with Growable[(A, B)] with Shrinkable[A] with Cloneable[This] with Parallelizable[(A, B), ParMap[A, B]]

    A template trait for mutable maps.

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

    This trait implements a proxy for Map.

46. #### trait MultiMap[A, B] extends Map[A, Set[B]]

    A trait for mutable maps with multiple values assigned to a key.

47. #### class MutableList[A] extends AbstractSeq[A] with LinearSeq[A] with LinearSeqOptimized[A, MutableList[A]] with GenericTraversableTemplate[A, MutableList] with Builder[A, MutableList[A]] with Serializable

    This class is used internally to represent mutable lists.

48. #### trait ObservableBuffer[A] extends Buffer[A] with Publisher[Message[A] with Undoable]

    This class is typically used as a mixin.

49. #### trait ObservableMap[A, B] extends Map[A, B] with Publisher[Message[(A, B)] with Undoable]

    This class is typically used as a mixin.

50. #### trait ObservableSet[A] extends Set[A] with Publisher[Message[A] with Undoable]

    This class is typically used as a mixin.

51. #### class OpenHashMap[Key, Value] extends AbstractMap[Key, Value] with Map[Key, Value] with MapLike[Key, Value, OpenHashMap[Key, Value]]

    A mutable hash map based on an open hashing scheme.

52. #### class PriorityQueue[A] extends AbstractIterable[A] with Iterable[A] with GenericOrderedTraversableTemplate[A, PriorityQueue] with IterableLike[A, PriorityQueue[A]] with Growable[A] with Builder[A, PriorityQueue[A]] with Serializable

    This class implements priority queues using a heap.

53. #### abstract class PriorityQueueProxy[A] extends PriorityQueue[A] with Proxy

    This class servers as a proxy for priority queues.

54. #### trait Publisher[Evt] extends AnyRef

    `Publisher[A,This]` objects publish events of type `A` to all registered subscribers.

55. #### class Queue[A] extends MutableList[A] with GenericTraversableTemplate[A, Queue] with Cloneable[Queue[A]] with Serializable

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

56. #### trait QueueProxy[A] extends Queue[A] with Proxy

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

57. #### trait ResizableArray[A] extends IndexedSeq[A] with GenericTraversableTemplate[A, ResizableArray] with IndexedSeqOptimized[A, ResizableArray[A]]

    This class is used internally to implement data structures that are based on resizable arrays.

58. #### class RevertibleHistory[Evt <: Undoable, Pub] extends History[Evt, Pub] with Undoable with Serializable

    A revertible history is a `History` object which supports an undo operation.

59. #### trait Seq[A] extends Iterable[A] with Seq[A] with GenericTraversableTemplate[A, Seq] with SeqLike[A, Seq[A]]

    A subtrait of `collection.Seq` which represents sequences that can be mutated.

60. #### trait SeqLike[A, +This <: SeqLike[A, This] with Seq[A]] extends SeqLike[A, This] with Cloneable[This] with Parallelizable[A, ParSeq[A]]

    A template trait for mutable sequences of type `mutable.Seq[A]`.

61. #### trait Set[A] extends Iterable[A] with Set[A] with GenericSetTemplate[A, Set] with SetLike[A, Set[A]]

    A generic trait for mutable sets.

62. #### class SetBuilder[A, Coll <: Set[A] with SetLike[A, Coll]] extends Builder[A, Coll]

    The canonical builder for mutable Sets.

63. #### trait SetLike[A, +This <: SetLike[A, This] with Set[A]] extends SetLike[A, This] with Scriptable[A] with Builder[A, This] with Growable[A] with Shrinkable[A] with Cloneable[Set[A]] with Parallelizable[A, ParSet[A]]

    A template trait for mutable sets of type `mutable.Set[A]`.

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

    This is a simple wrapper class for Set.

65. #### trait SortedSet[A] extends SortedSet[A] with SortedSetLike[A, SortedSet[A]] with Set[A] with SetLike[A, SortedSet[A]]

    Base trait for mutable sorted set.

66. #### class Stack[A] extends AbstractSeq[A] with Seq[A] with SeqLike[A, Stack[A]] with GenericTraversableTemplate[A, Stack] with Cloneable[Stack[A]] with Serializable

    A stack implements a data structure which allows to store and retrieve objects in a last-in-first-out (LIFO) fashion.

67. #### trait StackProxy[A] extends Stack[A] with Proxy

    A stack implements a data structure which allows to store and retrieve objects in a last-in-first-out (LIFO) fashion.

68. #### final class StringBuilder extends AbstractSeq[Char] with CharSequence with IndexedSeq[Char] with StringLike[StringBuilder] with Builder[Char, String] with Serializable

    A builder for mutable sequence of characters.

69. #### trait Subscriber[-Evt, -Pub] extends AnyRef

    `Subscriber[A, B]` objects may subscribe to events of type `A` published by an object of type `B`.

70. #### trait SynchronizedBuffer[A] extends Buffer[A]

    This class should be used as a mixin.

71. #### trait SynchronizedMap[A, B] extends Map[A, B]

    This class should be used as a mixin.

72. #### class SynchronizedPriorityQueue[A] extends PriorityQueue[A]

    This class implements synchronized priority queues using a binary heap.

73. #### class SynchronizedQueue[A] extends Queue[A]

    This is a synchronized version of the `Queue[T]` class.

74. #### trait SynchronizedSet[A] extends Set[A]

    This class should be used as a mixin.

75. #### class SynchronizedStack[A] extends Stack[A]

    This is a synchronized version of the `Stack[T]` class.

76. #### trait Traversable[A] extends Traversable[A] with GenericTraversableTemplate[A, Traversable] with TraversableLike[A, Traversable[A]] with Mutable

    A trait for traversable collections that can be mutated.

77. #### class TreeSet[A] extends SortedSet[A] with SetLike[A, TreeSet[A]] with SortedSetLike[A, TreeSet[A]] with Set[A] with Serializable

    A mutable SortedSet using an immutable AVL Tree as underlying data structure.

78. #### trait Undoable extends AnyRef

    Classes that mix in the `Undoable` class provide an operation `undo` which can be used to undo the last operation.

79. #### class UnrolledBuffer[T] extends AbstractBuffer[T] with Buffer[T] with BufferLike[T, UnrolledBuffer[T]] with GenericClassManifestTraversableTemplate[T, UnrolledBuffer] with Builder[T, UnrolledBuffer[T]] with Serializable

    A buffer that stores elements in an unrolled linked list.

80. #### class WeakHashMap[A, B] extends JMapWrapper[A, B] with JMapWrapperLike[A, B, WeakHashMap[A, B]]

    A hash map with references to entries which are weakly reachable.

81. #### abstract class WrappedArray[T] extends AbstractSeq[T] with IndexedSeq[T] with ArrayLike[T, WrappedArray[T]] with CustomParallelizable[T, ParArray[T]]

    A class representing `Array[T]`.

82. #### class WrappedArrayBuilder[A] extends Builder[A, WrappedArray[A]]

    A builder class for arrays.

### Value Members

1. #### object ArrayBuffer extends SeqFactory[ArrayBuffer] with Serializable

   Factory object for the `ArrayBuffer` class.

2. #### object ArrayBuilder extends Serializable

   A companion object for array builders.

3. #### object ArrayOps extends AnyRef

   A companion object for `ArrayOps`.

4. #### object ArraySeq extends SeqFactory[ArraySeq] with Serializable

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

5. #### object ArrayStack extends SeqFactory[ArrayStack] with Serializable

   Factory object for the `ArrayStack` class.

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

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

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

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

8. #### object Ctrie extends MutableMapFactory[Ctrie] with Serializable

9. #### object DoubleLinkedList extends SeqFactory[DoubleLinkedList] with Serializable

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

10. #### object HashMap extends MutableMapFactory[HashMap] with Serializable

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

11. #### object HashSet extends MutableSetFactory[HashSet] with Serializable

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

12. #### object IndexedSeq extends SeqFactory[IndexedSeq]

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

13. #### object IndexedSeqView extends AnyRef

    An object containing the necessary implicit definitions to make `SeqView`s work.

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

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

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

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

16. #### object LinkedHashMap extends MutableMapFactory[LinkedHashMap] with Serializable

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

17. #### object LinkedHashSet extends MutableSetFactory[LinkedHashSet] with Serializable

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

18. #### object LinkedList extends SeqFactory[LinkedList] with Serializable

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

19. #### object ListBuffer extends SeqFactory[ListBuffer] with Serializable

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

20. #### object ListMap extends MutableMapFactory[ListMap] with Serializable

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

21. #### object Map extends MutableMapFactory[Map]

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

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

23. #### object OpenHashMap extends AnyRef

24. #### object PriorityQueue extends OrderedTraversableFactory[PriorityQueue] with Serializable

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

26. #### object ResizableArray extends SeqFactory[ResizableArray]

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

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

28. #### object Set extends MutableSetFactory[Set]

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

29. #### object SortedSet extends MutableSortedSetFactory[SortedSet]

    A template for mutable sorted set companion objects.

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

    Factory object for the `mutable.Stack` class.

31. #### object StringBuilder extends Serializable

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

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

33. #### object TreeSet extends MutableSortedSetFactory[TreeSet] with Serializable

34. #### object UnrolledBuffer extends ClassManifestTraversableFactory[UnrolledBuffer] with Serializable

35. #### object WeakHashMap extends MutableMapFactory[WeakHashMap] with Serializable

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

36. #### object WrappedArray extends AnyRef

    A companion object used to create instances of `WrappedArray`.