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
  • ::
  • BitSet
  • HashSet
  • Iterable
  • LazyList
  • List
  • Map
  • MapLike
  • MapMonoTransforms
  • Nil
  • Seq
  • Set
  • SetLike
  • SetMonoTransforms
  • SortedMap
  • SortedMapFactories
  • SortedMapLike
  • SortedMapPolyTransforms
  • SortedSet
  • SortedSetLike
  • TreeMap
  • TreeSet
  • package mutable
    Definition Classes
    collection

package immutable

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. case class :: [+A](x: A, next: List[A]) extends List[A] with Product with Serializable
  2. trait BitSet extends collection.BitSet with BitSetLike[BitSet] with SortedSet[Int] with SetMonoTransforms[Int, BitSet]
  3. class HashSet [A] extends Set[A] with SetLike[A, HashSet]

    An immutable Set backed by a hash trie

  4. trait Iterable [+A] extends collection.Iterable[A] with IterableLike[A, Iterable]
  5. class LazyList [+A] extends Seq[A] with SeqLike[A, LazyList] with LinearSeq[A]
  6. sealed trait List [+A] extends Seq[A] with SeqLike[A, List] with LinearSeq[A] with Buildable[A, List[A]]

    Concrete collection type: List

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

    Base type of immutable Maps

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

    Base trait of immutable Maps implementations

  9. trait MapMonoTransforms [K, +V, +Repr <: Map[K, V]] extends IterableMonoTransforms[(K, V), Repr]

    Immutable Map operations returning a self-like Map

  10. trait Seq [+A] extends collection.Seq[A] with SeqLike[A, Seq] with Iterable[A]
  11. trait Set [A] extends collection.Set[A] with Iterable[A] with SetLike[A, Set]

    Base trait for immutable set collections

  12. trait SetLike [A, +C[X] <: Set[X]] extends collection.SetLike[A, C] with SetMonoTransforms[A, C[A]]

    Base trait for immutable set operations

  13. trait SetMonoTransforms [A, +Repr] extends collection.SetMonoTransforms[A, Repr]

    Transformation operations returning a Set containing the same kind of elements

  14. trait SortedMap [K, +V] extends Map[K, V] with Sorted[K] with SortedMapLike[K, V, SortedMap]
  15. trait SortedMapFactories [C[_, _]] extends AnyRef
  16. trait SortedMapLike [K, +V, +C[X, +Y] <: SortedMap[X, Y]] extends SortedLike[K, C[K, V]] with SortedMapPolyTransforms[K, V, C] with MapLike[K, V, Map] with MapMonoTransforms[K, V, C[K, V]]
  17. trait SortedMapPolyTransforms [K, +V, +C[X, Y] <: Sorted[X]] extends IterablePolyTransforms[(K, V), Iterable] with MapPolyTransforms[K, V, Map]

    Polymorphic transformation methods for sorted Maps

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

    Base trait for sorted sets

  19. trait SortedSetLike [A, +C[X] <: SortedSet[X]] extends collection.SortedSetLike[A, C] with SetLike[A, Set] with SetMonoTransforms[A, C[A]]
  20. final class TreeMap [K, +V] extends SortedMap[K, V] with SortedMapLike[K, V, TreeMap]
  21. final class TreeSet [A] extends SortedSet[A] with SortedSetLike[A, TreeSet]

    Immutable sorted set backed by a tree

Value Members

  1. object BitSet extends BitSetFactories[BitSet]
  2. object HashSet extends IterableFactories[HashSet]
  3. object LazyList extends IterableFactories[LazyList]
  4. object List extends IterableFactories[List]
  5. object Nil extends List[Nothing] with Product with Serializable
  6. object TreeMap extends SortedMapFactories[TreeMap]
  7. object TreeSet extends OrderingGuidedFactories[TreeSet]

Ungrouped