Packages

  • package root
    Definition Classes
    root
  • package strawman
    Definition Classes
    root
  • package collection

    A strawman architecture for new collections.

    A strawman architecture for new collections. It contains some example collection classes and methods with the intent to expose some key issues. It would be good to compare this to odether implementations of the same functionality, to get an idea of the strengths and weaknesses of different collection architectures.

    For a test file, see tests/run/CollectionTests.scala.

    Strawman6 is like strawman5, and adds lazy lists (i.e. lazie streams), arrays and some utilitity methods (take, tail, mkString, toArray). Also, systematically uses builders for all strict collections.

    Types covered in this strawman:

    1. Collection base types:

    IterableOnce, Iterable, Seq, LinearSeq, View, IndexedView

    2. Collection creator base types:

    FromIterable, IterableFactory, Buildable, Builder

    3. Types that bundle operations:

    IterableOps, IterableMonoTransforms, IterablePolyTransforms, IterableLike SeqMonoTransforms, SeqLike

    4. Concrete collection types:

    List, LazyList, ListBuffer, ArrayBuffer, ArrayBufferView, StringView, ArrayView

    5. Decorators for existing types

    StringOps, ArrayOps

    6. Related non collection types:

    Iterator, StringBuilder

    Operations covered in this strawman:

    1. Abstract operations, or expected to be overridden:

    For iterables:

    iterator, fromIterable, fromIterableWithSameElemType, knownLength, className

    For sequences:

    apply, length

    For buildables:

    newBuilder

    For builders:

    +=, result

    2. Utility methods, might be overridden for performance:

    Operations returning not necessarily a collection:

    foreach, foldLeft, foldRight, indexWhere, isEmpty, head, size, mkString

    Operations returning a collection of a fixed type constructor:

    view, to, toArray, copyToArray

    Type-preserving generic transforms:

    filter, partition, take, drop, tail, reverse

    Generic transforms returning collections of different element types:

    map, flatMap, ++, zip

    Definition Classes
    strawman
  • package immutable
    Definition Classes
    collection
  • package mutable
    Definition Classes
    collection
  • ArrayBuffer
  • ArrayBufferView
  • BitSet
  • Buildable
  • Builder
  • Growable
  • GrowableSeq
  • HashMap
  • HashSet
  • IndexedOptimizedGrowableSeq
  • IndexedOptimizedSeq
  • Iterable
  • ListBuffer
  • Map
  • MapLike
  • RefArrayUtils
  • Seq
  • Set
  • SetLike
  • SetMonoTransforms
  • SortedSet
  • SortedSetLike
  • StringBuilder

package mutable

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. class ArrayBuffer [A] extends IndexedOptimizedGrowableSeq[A] with SeqLike[A, ArrayBuffer] with Buildable[A, ArrayBuffer[A]] with Builder[A, ArrayBuffer[A]]

    Concrete collection type: ArrayBuffer

  2. class ArrayBufferView [A] extends IndexedView[A]
  3. trait BitSet extends collection.BitSet with BitSetLike[BitSet] with SortedSet[Int]
  4. trait Buildable [+A, +Repr] extends IterableMonoTransforms[A, Repr]

    Base trait for strict collections that can be built using a builder.

    Base trait for strict collections that can be built using a builder.

    A

    the element type of the collection

    Repr

    the type of the underlying collection

  5. trait Builder [-A, +To] extends Growable[A]

    Base trait for collection builders

  6. trait Growable [-A] extends AnyRef

    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.

  7. trait GrowableSeq [A] extends Seq[A] with SeqLike[A, Seq] with Growable[A]
  8. final class HashMap [K, V] extends Map[K, V] with MapLike[K, V, HashMap]

    A mutable map backed by a hashtable

  9. final class HashSet [A] extends Set[A] with SetLike[A, HashSet] with Buildable[A, HashSet[A]] with Builder[A, HashSet[A]]

    Mutable set backed by a hash trie

  10. trait IndexedOptimizedGrowableSeq [A] extends IndexedOptimizedSeq[A] with GrowableSeq[A]
  11. trait IndexedOptimizedSeq [A] extends Seq[A]
  12. trait Iterable [A] extends collection.Iterable[A] with IterableLike[A, Iterable]
  13. class ListBuffer [A] extends Seq[A] with SeqLike[A, ListBuffer] with Buildable[A, ListBuffer[A]] with Builder[A, ListBuffer[A]]

    Concrete collection type: ListBuffer

  14. trait Map [K, V] extends collection.Map[K, V] with MapLike[K, V, Map]

    Base type of mutable Maps

  15. trait MapLike [K, V, +C[X, Y] <: Map[X, Y]] extends collection.MapLike[K, V, C] with Iterable[(K, V)] with Growable[(K, V)]

    Base trait of mutable Maps implementations

  16. trait Seq [A] extends collection.Seq[A] with SeqLike[A, Seq] with Iterable[A]
  17. trait Set [A] extends collection.Set[A] with SetLike[A, Set] with Growable[A]

    Base trait for mutable sets

  18. trait SetLike [A, +C[X] <: Set[X]] extends collection.SetLike[A, C] with SetMonoTransforms[A, C[A]]
  19. trait SetMonoTransforms [A, +Repr] extends collection.SetMonoTransforms[A, Repr]
  20. trait SortedSet [A] extends collection.SortedSet[A] with Set[A] with SortedSetLike[A, SortedSet]
  21. trait SortedSetLike [A, +C[X] <: SortedSet[X]] extends collection.SortedSetLike[A, C] with SetLike[A, Set] with SetMonoTransforms[A, C[A]]
  22. class StringBuilder extends Builder[Char, String]

Value Members

  1. object ArrayBuffer extends IterableFactories[ArrayBuffer]
  2. object BitSet extends BitSetFactories[BitSet]
  3. object HashMap extends MapFactories[HashMap]
  4. object HashSet extends IterableFactories[HashSet]
  5. object ListBuffer extends IterableFactories[ListBuffer]
  6. object RefArrayUtils

    An object used internally by collections backed by an extensible Array[AnyRef]

  7. object Set

Ungrouped