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 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

trait Buildable[+A, +Repr] extends IterableMonoTransforms[A, Repr]

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

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Buildable
  2. IterableMonoTransforms
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def coll: collection.Iterable[A]
    Attributes
    protected
    Definition Classes
    IterableMonoTransforms
  2. abstract def fromIterableWithSameElemType(coll: collection.Iterable[A]): Repr
    Attributes
    protected[this]
    Definition Classes
    IterableMonoTransforms
  3. abstract def getClass(): Class[_]
    Definition Classes
    Any
  4. abstract def newBuilder: Builder[A, Repr]

    Creates a new builder.

    Creates a new builder.

    Attributes
    protected[this]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def drop(n: Int): Repr

    The rest of the collection without its n first elements.

    The rest of the collection without its n first elements. For linear, immutable collections this should avoid making a copy.

    Definition Classes
    IterableMonoTransforms
  6. def equals(arg0: Any): Boolean
    Definition Classes
    Any
  7. def filter(p: (A) ⇒ Boolean): Repr

    All elements satisfying predicate p

    All elements satisfying predicate p

    Definition Classes
    IterableMonoTransforms
  8. def hashCode(): Int
    Definition Classes
    Any
  9. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  10. def partition(p: (A) ⇒ Boolean): (Repr, Repr)

    Optimized, push-based version of partition.

    Optimized, push-based version of partition.

    Definition Classes
    BuildableIterableMonoTransforms
  11. def tail: Repr

    The rest of the collection without its first element.

    The rest of the collection without its first element.

    Definition Classes
    IterableMonoTransforms
  12. def take(n: Int): Repr

    A collection containing the first n elements of this collection.

    A collection containing the first n elements of this collection.

    Definition Classes
    IterableMonoTransforms
  13. def toString(): String
    Definition Classes
    Any

Inherited from IterableMonoTransforms[A, Repr]

Inherited from Any

Ungrouped