scala.collection

# mutable

#### package mutable

Visibility

1. Public
2. All

### Type Members

1. #### class ArrayBuffer[A] extends 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 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 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 Set[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 DefaultEntry[A, B] extends HashEntry[A, DefaultEntry[A, B]] with Serializable

    Class used internally for default map model.

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

    This class is used internally.

16. #### class DoubleLinkedList[A] extends 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.

17. #### 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.

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

    An implementation class backing a `HashSet`.

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

    The canonical builder for collections that are growable, i.

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

    Class used internally.

21. #### class HashMap[A, B] extends 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.

22. #### class HashSet[A] extends 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.

23. #### 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.

24. #### class History[Evt, Pub] extends 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`.

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

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

26. #### class ImmutableSetAdaptor[A] extends Set[A] with Serializable

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

27. #### 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.

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

    A subtrait of scala.

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

    A subtrait of scala.

30. #### 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`.

31. #### 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.

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

    A builder that constructs its result lazily.

33. #### 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.

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

    Class for the linked hash map entry, used internally.

35. #### class LinkedHashMap[A, B] extends 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.

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

    This class implements mutable sets using a hashtable.

37. #### class LinkedList[A] extends 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.

38. #### 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.

39. #### final class ListBuffer[A] extends 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.

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

    A simple mutable map backed by a list.

41. #### 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.

42. #### 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.

43. #### 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.

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

    This trait implements a proxy for `scala.collection.mutable.Map`.

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

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

46. #### class MutableList[A] extends 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.

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

    This class is typically used as a mixin.

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

    This class is typically used as a mixin.

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

    This class is typically used as a mixin.

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

    A mutable hash map based on an open hashing scheme.

51. #### class PriorityQueue[A] extends 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.

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

    This class servers as a proxy for priority queues.

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

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

54. #### 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.

55. #### 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.

56. #### 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.

57. #### 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.

58. #### 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.

59. #### 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]`.

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

    A generic trait for mutable sets.

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

    The canonical builder for mutable Sets.

62. #### 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]`.

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

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

64. #### class Stack[A] extends 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.

65. #### 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.

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

    A builder for mutable sequence of characters.

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

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

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

    This class should be used as a mixin.

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

    This class should be used as a mixin.

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

    This class implements synchronized priority queues using a binary heap.

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

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

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

    This class should be used as a mixin.

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

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

74. #### 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.

75. #### trait Undoable extends AnyRef

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

76. #### class UnrolledBuffer[T] extends 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.

77. #### 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.

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

    A class representing `Array[T]`.

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

    A builder class for arrays.

80. #### class AddingBuilder[Elem, To <: Addable[Elem, To] with Iterable[Elem] with IterableLike[Elem, To]] extends Builder[Elem, To]

    The canonical builder for collections that are addable, i.

### 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 DoubleLinkedList extends SeqFactory[DoubleLinkedList] with Serializable

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

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

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

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

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

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

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

12. #### object IndexedSeqView extends AnyRef

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

22. #### object OpenHashMap extends AnyRef

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

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

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

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

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

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

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

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

    Factory object for the `mutable.Stack` class.

29. #### object StringBuilder extends Serializable

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

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

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

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

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

33. #### object WrappedArray extends AnyRef

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