scala.collection.mutable

Members list

Concise view

Type members

Classlikes

abstract class AbstractBuffer[A] extends AbstractSeq[A] with Buffer[A]

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

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

Attributes

Source:
Buffer.scala
Graph
Supertypes
trait Buffer[A]
trait Shrinkable[A]
trait Growable[A]
trait Clearable
class AbstractSeq[A]
trait Seq[A]
trait SeqOps[A, Buffer, Buffer[A]]
trait Cloneable[Buffer[A]]
trait Cloneable
trait Iterable[A]
class AbstractSeq[A]
trait Seq[A]
trait Equals
trait SeqOps[A, Buffer, Buffer[A]]
trait Int => A
trait Iterable[A]
trait IterableOps[A, Buffer, Buffer[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Known subtypes
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]
class ListBuffer[A]
abstract class AbstractIterable[A] extends AbstractIterable[A] with Iterable[A]

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

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

Attributes

Source:
Iterable.scala
Graph
Supertypes
Known subtypes
class PriorityQueue[A]
abstract class AbstractMap[K, V] extends AbstractMap[K, V] with Map[K, V]

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

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

Attributes

Source:
Map.scala
Graph
Supertypes
trait Map[K, V]
trait MapOps[K, V, Map, Map[K, V]]
trait Shrinkable[K]
trait Builder[(K, V), Map[K, V]]
trait Growable[(K, V)]
trait Clearable
trait Cloneable[Map[K, V]]
trait Cloneable
trait Iterable[(K, V)]
class AbstractMap[K, V]
trait Map[K, V]
trait Equals
trait MapOps[K, V, Map, Map[K, V]]
trait PartialFunction[K, V]
trait K => V
class AbstractIterable[(K, V)]
trait Iterable[(K, V)]
trait IterableOps[(K, V), Iterable, Map[K, V]]
trait IterableOnceOps[(K, V), Iterable, Map[K, V]]
trait IterableOnce[(K, V)]
class Object
trait Matchable
class Any
Known subtypes
class TrieMap[K, V]
class AnyRefMap[K, V]
class HashMap[K, V]
class LinkedHashMap[K, V]
class ListMap[K, V]
class LongMap[V]
class WithDefault[K, V]
class WithDefault[K, V]
class OpenHashMap[Key, Value]
class TreeMap[K, V]
abstract class AbstractSeq[A] extends AbstractSeq[A] with Seq[A]

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

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

Attributes

Source:
Seq.scala
Graph
Supertypes
trait Seq[A]
trait SeqOps[A, Seq, Seq[A]]
trait Cloneable[Seq[A]]
trait Cloneable
trait Iterable[A]
class AbstractSeq[A]
trait Seq[A]
trait Equals
trait SeqOps[A, Seq, Seq[A]]
trait Int => A
trait Iterable[A]
trait IterableOps[A, Seq, Seq[A]]
trait IterableOnceOps[A, Seq, Seq[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Known subtypes
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]
class ListBuffer[A]
class ArraySeq[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
abstract class AbstractSet[A] extends AbstractSet[A] with Set[A]

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

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

Attributes

Source:
Set.scala
Graph
Supertypes
trait Set[A]
trait SetOps[A, Set, Set[A]]
trait Shrinkable[A]
trait Builder[A, Set[A]]
trait Growable[A]
trait Clearable
trait Cloneable[Set[A]]
trait Cloneable
trait Iterable[A]
class AbstractSet[A]
trait Set[A]
trait Equals
trait SetOps[A, Set, Set[A]]
trait A => Boolean
trait Iterable[A]
trait IterableOps[A, Set, Set[A]]
trait IterableOnceOps[A, Set, Set[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Known subtypes
class BitSet
class HashSet[A]
class LinkedHashSet[A]
class TreeSet[A]
class AnyRefMap[K <: AnyRef, V] extends AbstractMap[K, V] with MapOps[K, V, Map, AnyRefMap[K, V]] with StrictOptimizedIterableOps[(K, V), Iterable, AnyRefMap[K, V]] with Serializable

This class implements mutable maps with AnyRef keys based on a hash table with open addressing.

This class implements mutable maps with AnyRef keys based on a hash table with open addressing.

Basic map operations on single entries, including contains and get, are typically significantly faster with AnyRefMap than HashMap. Note that numbers and characters are not handled specially in AnyRefMap; only plain equals and hashCode are used in comparisons.

Methods that traverse or regenerate the map, including foreach and map, are not in general faster than with HashMap. The methods foreachKey, foreachValue, mapValuesNow, and transformValues are, however, faster than alternative ways to achieve the same functionality.

Maps with open addressing may become less efficient at lookup after repeated addition/removal of elements. Although AnyRefMap makes a decent attempt to remain efficient regardless, calling repack on a map that will no longer have elements removed but will be used heavily may save both time and storage space.

This map is not intended to contain more than 229 entries (approximately 500 million). The maximum capacity is 230, but performance will degrade rapidly as 230 is approached.

Attributes

Companion:
object
Source:
AnyRefMap.scala
Graph
Supertypes
class AbstractMap[K, V]
trait Map[K, V]
trait MapOps[K, V, Map, AnyRefMap[K, V]]
trait Shrinkable[K]
trait Builder[(K, V), AnyRefMap[K, V]]
trait Growable[(K, V)]
trait Clearable
trait Cloneable[AnyRefMap[K, V]]
trait Cloneable
trait Iterable[(K, V)]
class AbstractMap[K, V]
trait Map[K, V]
trait Equals
trait MapOps[K, V, Map, AnyRefMap[K, V]]
trait PartialFunction[K, V]
trait K => V
class AbstractIterable[(K, V)]
trait Iterable[(K, V)]
trait IterableOps[(K, V), Iterable, AnyRefMap[K, V]]
trait IterableOnceOps[(K, V), Iterable, AnyRefMap[K, V]]
trait IterableOnce[(K, V)]
class Object
trait Matchable
class Any
object AnyRefMap

Attributes

Companion:
class
Source:
AnyRefMap.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

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

An implementation of the Buffer class using an array to represent the assembled sequence internally. Append, update and random access take constant time (amortized time). Prepends and removes are linear in the buffer size.

Attributes

A

the type of this arraybuffer's elements.

See also:

"Scala's Collection Library overview" section on Array Buffers for more information.

Companion:
object
Source:
ArrayBuffer.scala
Graph
Supertypes

Factory object for the ArrayBuffer class.

Factory object for the ArrayBuffer class.

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

Attributes

Companion:
class
Source:
ArrayBuffer.scala
Graph
Supertypes
Self type
final class ArrayBufferView[A] extends AbstractIndexedSeqView[A]

Attributes

Source:
ArrayBuffer.scala
Graph
Supertypes
trait IndexedSeqOps[A, View, View[A]]
trait SeqView[A]
trait SeqOps[A, View, View[A]]
class AbstractView[A]
trait View[A]
trait Iterable[A]
trait IterableOps[A, View, View[A]]
trait IterableOnceOps[A, View, View[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
sealed abstract class ArrayBuilder[T] extends ReusableBuilder[T, Array[T]] with Serializable

A builder class for arrays.

A builder class for arrays.

Attributes

T

the type of the elements for the builder.

Companion:
object
Source:
ArrayBuilder.scala
Graph
Supertypes
trait ReusableBuilder[T, Array[T]]
trait Builder[T, Array[T]]
trait Growable[T]
trait Clearable
class Object
trait Matchable
class Any
Known subtypes
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit

A companion object for array builders.

A companion object for array builders.

Attributes

Companion:
class
Source:
ArrayBuilder.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

An implementation of a double-ended queue that internally uses a resizable circular buffer.

An implementation of a double-ended queue that internally uses a resizable circular buffer.

Append, prepend, removeFirst, removeLast and random-access (indexed-lookup and indexed-replacement) take amortized constant time. In general, removals and insertions at i-th index are O(min(i, n-i)) and thus insertions and removals from end/beginning are fast.

Attributes

A

the type of this ArrayDeque's elements.

Note:

Subclasses must override the ofArray protected method to return a more specific type.

Companion:
object
Source:
ArrayDeque.scala
Graph
Supertypes
Known subtypes
class Queue[A]
class Stack[A]

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

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

Attributes

Companion:
class
Source:
ArrayDeque.scala
Graph
Supertypes
Self type
trait ArrayDequeOps[A, +CC[_], +C <: AnyRef] extends StrictOptimizedSeqOps[A, CC, C]

Attributes

Source:
ArrayDeque.scala
Graph
Supertypes
trait StrictOptimizedSeqOps[A, CC, C]
trait SeqOps[A, CC, C]
trait IterableOps[A, CC, C]
trait IterableOnceOps[A, CC, C]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Known subtypes
class ArrayDeque[A]
class Queue[A]
class Stack[A]
sealed abstract class ArraySeq[T] extends AbstractSeq[T] with IndexedSeq[T] with IndexedSeqOps[T, ArraySeq, ArraySeq[T]] with StrictOptimizedSeqOps[T, ArraySeq, ArraySeq[T]] with Serializable

A collection representing Array[T].

A collection representing Array[T]. Unlike ArrayBuffer it is always backed by the same underlying Array, therefore it is not growable or shrinkable.

Attributes

T

type of the elements in this wrapped array.

Companion:
object
Source:
ArraySeq.scala
Graph
Supertypes
trait IndexedSeq[T]
trait IndexedSeq[T]
class AbstractSeq[T]
trait Seq[T]
trait SeqOps[T, ArraySeq, ArraySeq[T]]
trait Cloneable
trait Iterable[T]
class AbstractSeq[T]
trait Seq[T]
trait Equals
trait SeqOps[T, ArraySeq, ArraySeq[T]]
trait Int => T
trait Iterable[T]
trait IterableOnce[T]
class Object
trait Matchable
class Any
Known subtypes
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit

A companion object used to create instances of ArraySeq.

A companion object used to create instances of ArraySeq.

Attributes

Companion:
class
Source:
ArraySeq.scala
Graph
Supertypes
Self type

A class for mutable bitsets.

A class for mutable bitsets.

Bitsets are sets of non-negative integers which are represented as variable-size arrays of bits packed into 64-bit words. The lower bound of memory footprint of a bitset is determined by the largest number stored in it.

Attributes

See also:

"Scala's Collection Library overview" section on Mutable Bitsets for more information.

Companion:
object
Source:
BitSet.scala
Graph
Supertypes

Attributes

Companion:
class
Source:
BitSet.scala
Graph
Supertypes
Self type
BitSet.type
trait Buffer[A] extends Seq[A] with SeqOps[A, Buffer, Buffer[A]] with Growable[A] with Shrinkable[A] with IterableFactoryDefaults[A, Buffer]

A Buffer is a growable and shrinkable Seq.

A Buffer is a growable and shrinkable Seq.

Attributes

Companion:
object
Source:
Buffer.scala
Graph
Supertypes
trait Shrinkable[A]
trait Growable[A]
trait Clearable
trait Seq[A]
trait SeqOps[A, Buffer, Buffer[A]]
trait Cloneable[Buffer[A]]
trait Cloneable
trait Seq[A]
trait Equals
trait SeqOps[A, Buffer, Buffer[A]]
trait Int => A
trait Iterable[A]
trait Iterable[A]
trait IterableOps[A, Buffer, Buffer[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Known subtypes
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]
class ListBuffer[A]
trait IndexedBuffer[A]
object Buffer extends Delegate[Buffer]

Attributes

Companion:
trait
Source:
Buffer.scala
Graph
Supertypes
Self type
Buffer.type
trait Builder[-A, +To] extends Growable[A]

Base trait for collection builders.

Base trait for collection builders.

After calling result() the behavior of a Builder (which is not also a scala.collection.mutable.ReusableBuilder) is undefined. No further methods should be called. It is common for mutable collections to be their own non-reusable Builder, in which case result() simply returns this.

Attributes

See also:

scala.collection.mutable.ReusableBuilder for Builders which can be reused after calling result()

Source:
Builder.scala
Graph
Supertypes
trait Growable[A]
trait Clearable
class Object
trait Matchable
class Any
Known subtypes
class Builder[K, V]
class GrowableBuilder[Elem, To]
trait MapOps[K, V, CC, C]
class TrieMap[K, V]
class AnyRefMap[K, V]
class HashMap[K, V]
class LinkedHashMap[K, V]
class ListMap[K, V]
class LongMap[V]
trait Map[K, V]
trait Map[K, V]
class AbstractMap[K, V]
class WithDefault[K, V]
class WithDefault[K, V]
class OpenHashMap[Key, Value]
class TreeMap[K, V]
trait MultiMap[K, V]
trait SeqMap[K, V]
trait SortedMap[K, V]
trait SortedMapOps[K, V, CC, C]
class PriorityQueue[A]
trait ReusableBuilder[Elem, To]
class VectorBuilder[A]
class AnyRefMapBuilder[K, V]
class ArrayBuilder[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
class ImmutableBuilder[A, C]
class ListBuffer[A]
trait SetOps[A, CC, C]
class HashSet[A]
class LinkedHashSet[A]
trait Set[A]
class AbstractSet[A]
class BitSet
class TreeSet[A]
trait SortedSet[A]
trait SortedSetOps[A, CC, C]
class Accumulator[A, CC, C]
Self type
Builder[A, To]
trait Clearable

This trait forms part of collections that can be cleared with a clear() call.

This trait forms part of collections that can be cleared with a clear() call.

Attributes

Source:
Growable.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Growable[A]
trait Buffer[A]
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]
class ListBuffer[A]
trait IndexedBuffer[A]
trait Builder[A, To]
class Builder[K, V]
class GrowableBuilder[Elem, To]
trait MapOps[K, V, CC, C]
class TrieMap[K, V]
class AnyRefMap[K, V]
class HashMap[K, V]
class LinkedHashMap[K, V]
class ListMap[K, V]
class LongMap[V]
trait Map[K, V]
trait Map[K, V]
class AbstractMap[K, V]
class WithDefault[K, V]
class WithDefault[K, V]
class OpenHashMap[Key, Value]
class TreeMap[K, V]
trait MultiMap[K, V]
trait SeqMap[K, V]
trait SortedMap[K, V]
trait SortedMapOps[K, V, CC, C]
class PriorityQueue[A]
trait ReusableBuilder[Elem, To]
class VectorBuilder[A]
class AnyRefMapBuilder[K, V]
class ArrayBuilder[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
class ImmutableBuilder[A, C]
trait SetOps[A, CC, C]
class HashSet[A]
class LinkedHashSet[A]
trait Set[A]
class AbstractSet[A]
class BitSet
class TreeSet[A]
trait SortedSet[A]
trait SortedSetOps[A, CC, C]
class Accumulator[A, CC, C]
trait Cloneable[+C <: AnyRef] extends Cloneable

A trait for cloneable collections.

A trait for cloneable collections.

Attributes

C

Type of the collection, covariant and with reference types as upperbound.

Source:
Cloneable.scala
Graph
Supertypes
trait Cloneable
class Object
trait Matchable
class Any
Known subtypes
class ArrayDeque[A]
class Queue[A]
class Stack[A]
trait MapOps[K, V, CC, C]
class TrieMap[K, V]
class AnyRefMap[K, V]
class HashMap[K, V]
class LinkedHashMap[K, V]
class ListMap[K, V]
class LongMap[V]
trait Map[K, V]
trait Map[K, V]
class AbstractMap[K, V]
class WithDefault[K, V]
class WithDefault[K, V]
class OpenHashMap[Key, Value]
class TreeMap[K, V]
trait MultiMap[K, V]
trait SeqMap[K, V]
trait SortedMap[K, V]
trait SortedMapOps[K, V, CC, C]
class PriorityQueue[A]
trait SeqOps[A, CC, C]
trait Buffer[A]
class ArrayBuffer[A]
class ListBuffer[A]
trait IndexedBuffer[A]
trait IndexedSeqOps[A, CC, C]
class ArraySeq[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
trait IndexedSeq[T]
trait Seq[A]
class AbstractSeq[A]
class Accumulator[A, CC, C]
trait SetOps[A, CC, C]
class HashSet[A]
class LinkedHashSet[A]
trait Set[A]
class AbstractSet[A]
class BitSet
class TreeSet[A]
trait SortedSet[A]
trait SortedSetOps[A, CC, C]
final class CollisionProofHashMap[K, V](initialCapacity: Int, loadFactor: Double)(implicit ordering: Ordering[K]) extends AbstractMap[K, V] with MapOps[K, V, Map, CollisionProofHashMap[K, V]] with StrictOptimizedIterableOps[(K, V), Iterable, CollisionProofHashMap[K, V]] with StrictOptimizedMapOps[K, V, Map, CollisionProofHashMap[K, V]]

This class implements mutable maps using a hashtable with red-black trees in the buckets for good worst-case performance on hash collisions.

This class implements mutable maps using a hashtable with red-black trees in the buckets for good worst-case performance on hash collisions. An Ordering is required for the element type. Equality as determined by the Ordering has to be consistent with equals and hashCode. Universal equality of numeric types is not supported (similar to AnyRefMap).

Attributes

See also:

"Scala's Collection Library overview" section on Hash Tables for more information.

Companion:
object
Source:
CollisionProofHashMap.scala
Graph
Supertypes
class AbstractMap[K, V]
trait Map[K, V]
trait MapOps[K, V, Map, CollisionProofHashMap[K, V]]
trait Shrinkable[K]
trait Builder[(K, V), CollisionProofHashMap[K, V]]
trait Growable[(K, V)]
trait Clearable
trait Cloneable
trait Iterable[(K, V)]
class AbstractMap[K, V]
trait Map[K, V]
trait Equals
trait MapOps[K, V, Map, CollisionProofHashMap[K, V]]
trait PartialFunction[K, V]
trait K => V
class AbstractIterable[(K, V)]
trait Iterable[(K, V)]
trait IterableOnce[(K, V)]
class Object
trait Matchable
class Any

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

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

Attributes

Companion:
class
Source:
CollisionProofHashMap.scala
Graph
Supertypes
Self type
trait Growable[-A] extends Clearable

This trait forms part of collections that can be augmented using a += operator and that can be cleared of all elements using a clear method.

This trait forms part of collections that can be augmented using a += operator and that can be cleared of all elements using a clear method.

Attributes

Companion:
object
Source:
Growable.scala
Graph
Supertypes
trait Clearable
class Object
trait Matchable
class Any
Known subtypes
trait Buffer[A]
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]
class ListBuffer[A]
trait IndexedBuffer[A]
trait Builder[A, To]
class Builder[K, V]
class GrowableBuilder[Elem, To]
trait MapOps[K, V, CC, C]
class TrieMap[K, V]
class AnyRefMap[K, V]
class HashMap[K, V]
class LinkedHashMap[K, V]
class ListMap[K, V]
class LongMap[V]
trait Map[K, V]
trait Map[K, V]
class AbstractMap[K, V]
class WithDefault[K, V]
class WithDefault[K, V]
class OpenHashMap[Key, Value]
class TreeMap[K, V]
trait MultiMap[K, V]
trait SeqMap[K, V]
trait SortedMap[K, V]
trait SortedMapOps[K, V, CC, C]
class PriorityQueue[A]
trait ReusableBuilder[Elem, To]
class VectorBuilder[A]
class AnyRefMapBuilder[K, V]
class ArrayBuilder[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
class ImmutableBuilder[A, C]
trait SetOps[A, CC, C]
class HashSet[A]
class LinkedHashSet[A]
trait Set[A]
class AbstractSet[A]
class BitSet
class TreeSet[A]
trait SortedSet[A]
trait SortedSetOps[A, CC, C]
class Accumulator[A, CC, C]
object Growable

Attributes

Companion:
trait
Source:
Growable.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
class GrowableBuilder[Elem, To <: Growable[Elem]](val elems: To) extends Builder[Elem, To]

The canonical builder for collections that are growable, i.e.

The canonical builder for collections that are growable, i.e. that support an efficient += method which adds an element to the collection.

GrowableBuilders can produce only a single instance of the collection they are growing.

Attributes

Source:
GrowableBuilder.scala
Graph
Supertypes
trait Builder[Elem, To]
trait Growable[Elem]
trait Clearable
class Object
trait Matchable
class Any
class HashMap[K, V](initialCapacity: Int, loadFactor: Double) extends AbstractMap[K, V] with MapOps[K, V, HashMap, HashMap[K, V]] with StrictOptimizedIterableOps[(K, V), Iterable, HashMap[K, V]] with StrictOptimizedMapOps[K, V, HashMap, HashMap[K, V]] with MapFactoryDefaults[K, V, HashMap, Iterable] with Serializable

This class implements mutable maps using a hashtable.

This class implements mutable maps using a hashtable.

Attributes

K

the type of the keys contained in this hash map.

V

the type of the values assigned to keys in this hash map.

See also:

"Scala's Collection Library overview" section on Hash Tables for more information.

Companion:
object
Source:
HashMap.scala
Graph
Supertypes
class AbstractMap[K, V]
trait Map[K, V]
trait MapOps[K, V, HashMap, HashMap[K, V]]
trait Shrinkable[K]
trait Builder[(K, V), HashMap[K, V]]
trait Growable[(K, V)]
trait Clearable
trait Cloneable[HashMap[K, V]]
trait Cloneable
trait Iterable[(K, V)]
class AbstractMap[K, V]
trait Map[K, V]
trait Equals
trait MapOps[K, V, HashMap, HashMap[K, V]]
trait PartialFunction[K, V]
trait K => V
class AbstractIterable[(K, V)]
trait Iterable[(K, V)]
trait IterableOps[(K, V), Iterable, HashMap[K, V]]
trait IterableOnceOps[(K, V), Iterable, HashMap[K, V]]
trait IterableOnce[(K, V)]
class Object
trait Matchable
class Any
object HashMap extends MapFactory[HashMap]

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

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

Attributes

Companion:
class
Source:
HashMap.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
HashMap.type
final class HashSet[A](initialCapacity: Int, loadFactor: Double) extends AbstractSet[A] with SetOps[A, HashSet, HashSet[A]] with StrictOptimizedIterableOps[A, HashSet, HashSet[A]] with IterableFactoryDefaults[A, HashSet] with Serializable

This class implements mutable sets using a hashtable.

This class implements mutable sets using a hashtable.

Attributes

See also:

"Scala's Collection Library overview" section on Hash Tables for more information.

Companion:
object
Source:
HashSet.scala
Graph
Supertypes
class AbstractSet[A]
trait Set[A]
trait SetOps[A, HashSet, HashSet[A]]
trait Shrinkable[A]
trait Builder[A, HashSet[A]]
trait Growable[A]
trait Clearable
trait Cloneable[HashSet[A]]
trait Cloneable
trait Iterable[A]
class AbstractSet[A]
trait Set[A]
trait Equals
trait SetOps[A, HashSet, HashSet[A]]
trait A => Boolean
trait Iterable[A]
trait IterableOnce[A]
class Object
trait Matchable
class Any

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

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

Attributes

Companion:
class
Source:
HashSet.scala
Graph
Supertypes
Self type
HashSet.type
abstract class ImmutableBuilder[-A, C <: IterableOnce[_]](empty: C) extends ReusableBuilder[A, C]

Reusable builder for immutable collections

Reusable builder for immutable collections

Attributes

Source:
ImmutableBuilder.scala
Graph
Supertypes
trait ReusableBuilder[A, C]
trait Builder[A, C]
trait Growable[A]
trait Clearable
class Object
trait Matchable
class Any

Attributes

Companion:
object
Source:
Buffer.scala
Graph
Supertypes
Known subtypes
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]

Attributes

Companion:
trait
Source:
Buffer.scala
Graph
Supertypes
Self type

Attributes

Companion:
object
Source:
IndexedSeq.scala
Graph
Supertypes
trait IndexedSeq[T]
trait Seq[T]
trait Cloneable
trait Seq[T]
trait Equals
trait Int => T
trait Iterable[T]
trait Iterable[T]
trait IterableOnce[T]
class Object
trait Matchable
class Any
Known subtypes
class ArraySeq[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
trait IndexedBuffer[A]
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]

Attributes

Companion:
trait
Source:
IndexedSeq.scala
Graph
Supertypes
Self type
trait IndexedSeqOps[A, +CC[_], +C <: AnyRef] extends IndexedSeqOps[A, CC, C] with SeqOps[A, CC, C]

Attributes

Source:
IndexedSeq.scala
Graph
Supertypes
trait SeqOps[A, CC, C]
trait Cloneable[C]
trait Cloneable
trait IndexedSeqOps[A, CC, C]
trait SeqOps[A, CC, C]
trait IterableOps[A, CC, C]
trait IterableOnceOps[A, CC, C]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Known subtypes
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]
class ArraySeq[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
trait IndexedBuffer[A]
trait IndexedSeq[T]

Attributes

Companion:
object
Source:
Iterable.scala
Graph
Supertypes
Known subtypes
class PriorityQueue[A]
trait Map[K, V]
trait Map[K, V]
class TrieMap[K, V]
class AbstractMap[K, V]
class AnyRefMap[K, V]
class HashMap[K, V]
class LinkedHashMap[K, V]
class ListMap[K, V]
class LongMap[V]
class WithDefault[K, V]
class WithDefault[K, V]
class OpenHashMap[Key, Value]
class TreeMap[K, V]
trait MultiMap[K, V]
trait SeqMap[K, V]
trait SortedMap[K, V]
trait Seq[A]
class AbstractSeq[A]
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]
class ListBuffer[A]
class ArraySeq[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
trait Buffer[A]
trait IndexedBuffer[A]
trait IndexedSeq[T]
class Accumulator[A, CC, C]
trait Set[A]
class AbstractSet[A]
class BitSet
class HashSet[A]
class LinkedHashSet[A]
class TreeSet[A]
trait SortedSet[A]
object Iterable extends Delegate[Iterable]

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

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

Attributes

Companion:
trait
Source:
Iterable.scala
Graph
Supertypes
Self type

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

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

Attributes

Companion:
class
Source:
LinkedHashMap.scala
Graph
Supertypes
Self type

This class implements mutable maps using a hashtable.

This class implements mutable maps using a hashtable. The iterator and all traversal methods of this class visit elements in the order they were inserted.

Attributes

K

the type of the keys contained in this hash map.

V

the type of the values assigned to keys in this hash map.

Companion:
object
Source:
LinkedHashMap.scala
Graph
Supertypes
trait SeqMap[K, V]
trait SeqMap[K, V]
class AbstractMap[K, V]
trait Map[K, V]
trait MapOps[K, V, LinkedHashMap, LinkedHashMap[K, V]]
trait Shrinkable[K]
trait Builder[(K, V), LinkedHashMap[K, V]]
trait Growable[(K, V)]
trait Clearable
trait Cloneable
trait Iterable[(K, V)]
class AbstractMap[K, V]
trait Map[K, V]
trait Equals
trait MapOps[K, V, LinkedHashMap, LinkedHashMap[K, V]]
trait PartialFunction[K, V]
trait K => V
class AbstractIterable[(K, V)]
trait Iterable[(K, V)]
trait IterableOps[(K, V), Iterable, LinkedHashMap[K, V]]
trait IterableOnceOps[(K, V), Iterable, LinkedHashMap[K, V]]
trait IterableOnce[(K, V)]
class Object
trait Matchable
class Any

This class implements mutable sets using a hashtable.

This class implements mutable sets using a hashtable. The iterator and all traversal methods of this class visit elements in the order they were inserted.

Attributes

A

the type of the elements contained in this set.

Companion:
object
Source:
LinkedHashSet.scala
Graph
Supertypes

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

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

Attributes

Companion:
class
Source:
LinkedHashSet.scala
Graph
Supertypes
Self type

A Buffer implementation backed by a list.

A Buffer implementation backed by a list. It provides constant time prepend and append. Most other operations are linear.

Attributes

A

the type of this list buffer's elements.

See also:

"Scala's Collection Library overview" section on List Buffers for more information.

Companion:
object
Source:
ListBuffer.scala
Graph
Supertypes

Attributes

Companion:
class
Source:
ListBuffer.scala
Graph
Supertypes
Self type
final class LongMap[V] extends AbstractMap[Long, V] with MapOps[Long, V, Map, LongMap[V]] with StrictOptimizedIterableOps[(Long, V), Iterable, LongMap[V]] with Serializable

This class implements mutable maps with Long keys based on a hash table with open addressing.

This class implements mutable maps with Long keys based on a hash table with open addressing.

Basic map operations on single entries, including contains and get, are typically substantially faster with LongMap than HashMap. Methods that act on the whole map, including foreach and map are not in general expected to be faster than with a generic map, save for those that take particular advantage of the internal structure of the map: foreachKey, foreachValue, mapValuesNow, and transformValues.

Maps with open addressing may become less efficient at lookup after repeated addition/removal of elements. Although LongMap makes a decent attempt to remain efficient regardless, calling repack on a map that will no longer have elements removed but will be used heavily may save both time and storage space.

This map is not intended to contain more than 229 entries (approximately 500 million). The maximum capacity is 230, but performance will degrade rapidly as 2^30 is approached.

Attributes

Companion:
object
Source:
LongMap.scala
Graph
Supertypes
class AbstractMap[Long, V]
trait Map[Long, V]
trait MapOps[Long, V, Map, LongMap[V]]
trait Builder[(Long, V), LongMap[V]]
trait Growable[(Long, V)]
trait Clearable
trait Cloneable[LongMap[V]]
trait Cloneable
trait Iterable[(Long, V)]
class AbstractMap[Long, V]
trait Map[Long, V]
trait Equals
trait MapOps[Long, V, Map, LongMap[V]]
trait Long => V
trait Iterable[(Long, V)]
trait IterableOps[(Long, V), Iterable, LongMap[V]]
trait IterableOnce[(Long, V)]
class Object
trait Matchable
class Any
object LongMap

Attributes

Companion:
class
Source:
LongMap.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
LongMap.type
trait Map[K, V] extends Iterable[(K, V)] with Map[K, V] with MapOps[K, V, Map, Map[K, V]] with Growable[(K, V)] with Shrinkable[K] with MapFactoryDefaults[K, V, Map, Iterable]

Base type of mutable Maps

Base type of mutable Maps

Attributes

Companion:
object
Source:
Map.scala
Graph
Supertypes
trait MapOps[K, V, Map, Map[K, V]]
trait Shrinkable[K]
trait Builder[(K, V), Map[K, V]]
trait Growable[(K, V)]
trait Clearable
trait Cloneable[Map[K, V]]
trait Cloneable
trait Map[K, V]
trait Equals
trait MapOps[K, V, Map, Map[K, V]]
trait PartialFunction[K, V]
trait K => V
trait Iterable[(K, V)]
trait Iterable[(K, V)]
trait IterableOps[(K, V), Iterable, Map[K, V]]
trait IterableOnceOps[(K, V), Iterable, Map[K, V]]
trait IterableOnce[(K, V)]
class Object
trait Matchable
class Any
Known subtypes
trait Map[K, V]
class TrieMap[K, V]
class AbstractMap[K, V]
class AnyRefMap[K, V]
class HashMap[K, V]
class LinkedHashMap[K, V]
class ListMap[K, V]
class LongMap[V]
class WithDefault[K, V]
class WithDefault[K, V]
class OpenHashMap[Key, Value]
class TreeMap[K, V]
trait MultiMap[K, V]
trait SeqMap[K, V]
trait SortedMap[K, V]
object Map extends Delegate[Map]

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

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

Attributes

Companion:
trait
Source:
Map.scala
Graph
Supertypes
class Delegate[Map]
class Object
trait Matchable
class Any
Self type
Map.type
trait MapOps[K, V, +CC <: (MapOps), +C <: MapOps[K, V, CC, C]] extends IterableOps[(K, V), Iterable, C] with MapOps[K, V, CC, C] with Cloneable[C] with Builder[(K, V), C] with Growable[(K, V)] with Shrinkable[K]

Attributes

Source:
Map.scala
Graph
Supertypes
trait Shrinkable[K]
trait Builder[(K, V), C]
trait Growable[(K, V)]
trait Clearable
trait Cloneable[C]
trait Cloneable
trait MapOps[K, V, CC, C]
trait PartialFunction[K, V]
trait K => V
trait IterableOps[(K, V), Iterable, C]
trait IterableOnceOps[(K, V), Iterable, C]
trait IterableOnce[(K, V)]
class Object
trait Matchable
class Any
Known subtypes
class TrieMap[K, V]
class AnyRefMap[K, V]
class HashMap[K, V]
class LinkedHashMap[K, V]
class ListMap[K, V]
class LongMap[V]
trait Map[K, V]
trait Map[K, V]
class AbstractMap[K, V]
class WithDefault[K, V]
class WithDefault[K, V]
class OpenHashMap[Key, Value]
class TreeMap[K, V]
trait MultiMap[K, V]
trait SeqMap[K, V]
trait SortedMap[K, V]
trait SortedMapOps[K, V, CC, C]
sealed class PriorityQueue[A](implicit val ord: Ordering[A]) extends AbstractIterable[A] with Iterable[A] with IterableOps[A, Iterable, PriorityQueue[A]] with StrictOptimizedIterableOps[A, Iterable, PriorityQueue[A]] with Builder[A, PriorityQueue[A]] with Cloneable[PriorityQueue[A]] with Growable[A] with Serializable

A heap-based priority queue.

A heap-based priority queue.

To prioritize elements of type A there must be an implicit Ordering[A] available at creation. Elements are retrieved in priority order by using dequeue or dequeueAll.

If multiple elements have the same priority as determined by the ordering for this PriorityQueue, no guarantees are made regarding the order in which those elements are returned by dequeue or dequeueAll. In particular, that means this class does not guarantee first-in-first-out behavior, as may be incorrectly inferred from the fact that this data structure is called a "queue".

Only the dequeue and dequeueAll methods will return elements in priority order (while removing elements from the heap). Standard collection methods such as drop, iterator, toList and toString use an arbitrary iteration order: they will traverse the heap or remove elements in whichever order seems most convenient.

Therefore, printing a PriorityQueue will not show elements in priority order, though the highest-priority element will be printed first. To print the elements in order, it's necessary to dequeue them. To do this non-destructively, duplicate the PriorityQueue first; the clone method is a suitable way to obtain a disposable copy.

Client keys are assumed to be immutable. Mutating keys may violate the invariant of the underlying heap-ordered tree. Note that clone does not rebuild the underlying tree.

scala> val pq = collection.mutable.PriorityQueue(1, 2, 5, 3, 7)
val pq: scala.collection.mutable.PriorityQueue[Int] = PriorityQueue(7, 3, 5, 1, 2)

scala> pq.toList              // also not in order
val res0: List[Int] = List(7, 3, 5, 1, 2)

scala> pq.clone.dequeueAll
val res1: Seq[Int] = ArraySeq(7, 5, 3, 2, 1)

Attributes

A

type of the elements in this priority queue.

ord

implicit ordering used to compare the elements of type A.

Companion:
object
Source:
PriorityQueue.scala
Graph
Supertypes

Attributes

Companion:
class
Source:
PriorityQueue.scala
Graph
Supertypes
Self type

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

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

Attributes

Companion:
object
Source:
Queue.scala
Graph
Supertypes
class ArrayDeque[A]
trait ArrayDequeOps[A, Queue, Queue[A]]
trait IndexedBuffer[A]
trait IndexedSeq[A]
trait IndexedSeqOps[A, Queue, Queue[A]]
trait IndexedSeq[A]
trait IndexedSeqOps[A, Queue, Queue[A]]
trait Buffer[A]
trait Shrinkable[A]
trait Growable[A]
trait Clearable
class AbstractSeq[A]
trait Seq[A]
trait SeqOps[A, Queue, Queue[A]]
trait Cloneable[Queue[A]]
trait Cloneable
trait Iterable[A]
class AbstractSeq[A]
trait Seq[A]
trait Equals
trait SeqOps[A, Queue, Queue[A]]
trait Int => A
trait Iterable[A]
trait IterableOps[A, Queue, Queue[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any

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

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

Attributes

Companion:
class
Source:
Queue.scala
Graph
Supertypes
Self type
Queue.type
trait ReusableBuilder[-Elem, +To] extends Builder[Elem, To]

ReusableBuilder is a marker trait that indicates that a Builder can be reused to build more than one instance of a collection.

ReusableBuilder is a marker trait that indicates that a Builder can be reused to build more than one instance of a collection. In particular, calling result() followed by clear() will produce a collection and reset the builder to begin building a new collection of the same type.

In general no method other than clear() may be called after result(). It is up to subclasses to implement and to document other allowed sequences of operations (e.g. calling other methods after result() in order to obtain different snapshots of a collection under construction).

Attributes

Elem

the type of elements that get added to the builder.

To

the type of collection that it produced.

Source:
ReusableBuilder.scala
Graph
Supertypes
trait Builder[Elem, To]
trait Growable[Elem]
trait Clearable
class Object
trait Matchable
class Any
Known subtypes
class VectorBuilder[A]
class AnyRefMapBuilder[K, V]
class ArrayBuilder[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
class ImmutableBuilder[A, C]
class ListBuffer[A]
trait Seq[A] extends Iterable[A] with Seq[A] with SeqOps[A, Seq, Seq[A]] with IterableFactoryDefaults[A, Seq]

Attributes

Companion:
object
Source:
Seq.scala
Graph
Supertypes
trait SeqOps[A, Seq, Seq[A]]
trait Cloneable[Seq[A]]
trait Cloneable
trait Seq[A]
trait Equals
trait SeqOps[A, Seq, Seq[A]]
trait Int => A
trait Iterable[A]
trait Iterable[A]
trait IterableOps[A, Seq, Seq[A]]
trait IterableOnceOps[A, Seq, Seq[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Known subtypes
class AbstractSeq[A]
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]
class ListBuffer[A]
class ArraySeq[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
trait Buffer[A]
trait IndexedBuffer[A]
trait IndexedSeq[T]
class Accumulator[A, CC, C]
object Seq extends Delegate[Seq]

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

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

Attributes

Companion:
trait
Source:
Seq.scala
Graph
Supertypes
class Delegate[Seq]
class Object
trait Matchable
class Any
Self type
Seq.type
trait SeqMap[K, V] extends Map[K, V] with SeqMap[K, V] with MapOps[K, V, SeqMap, SeqMap[K, V]] with MapFactoryDefaults[K, V, SeqMap, Iterable]

A generic trait for ordered mutable maps.

A generic trait for ordered mutable 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.

Attributes

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:
SeqMap.scala
Graph
Supertypes
trait SeqMap[K, V]
trait Map[K, V]
trait MapOps[K, V, SeqMap, SeqMap[K, V]]
trait Shrinkable[K]
trait Builder[(K, V), SeqMap[K, V]]
trait Growable[(K, V)]
trait Clearable
trait Cloneable[SeqMap[K, V]]
trait Cloneable
trait Map[K, V]
trait Equals
trait MapOps[K, V, SeqMap, SeqMap[K, V]]
trait PartialFunction[K, V]
trait K => V
trait Iterable[(K, V)]
trait Iterable[(K, V)]
trait IterableOps[(K, V), Iterable, SeqMap[K, V]]
trait IterableOnceOps[(K, V), Iterable, SeqMap[K, V]]
trait IterableOnce[(K, V)]
class Object
trait Matchable
class Any
Known subtypes
class LinkedHashMap[K, V]
object SeqMap extends Delegate[SeqMap]

Attributes

Companion:
trait
Source:
SeqMap.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
SeqMap.type
trait SeqOps[A, +CC[_], +C <: AnyRef] extends SeqOps[A, CC, C] with Cloneable[C]

Attributes

Source:
Seq.scala
Graph