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
t

strawman.collection.immutable

SortedMapPolyTransforms

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

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SortedMapPolyTransforms
  2. MapPolyTransforms
  3. IterablePolyTransforms
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def +[V1 >: V](kv: (K, V1)): C[K, V1]

    Add a key/value pair to this map, returning a new map.

    Add a key/value pair to this map, returning a new map.

    V1

    the type of the value in the key/value pair.

    kv

    the key/value pair.

    returns

    A new map with the new binding added to this map.

  2. abstract def coll: collection.Iterable[(K, V)]
    Attributes
    protected
    Definition Classes
    IterablePolyTransforms
  3. abstract def flatMap[K2, V2](f: (K, V) ⇒ IterableOnce[(K2, V2)]): Map[K2, V2]
    Definition Classes
    MapPolyTransforms
  4. abstract def fromIterable[B](coll: collection.Iterable[B]): Iterable[B]
    Definition Classes
    IterablePolyTransforms
  5. abstract def map[K2, V2](f: (K, V) ⇒ (K2, V2))(implicit ordering: Ordering[K2]): C[K2, V2]
  6. abstract def map[K2, V2](f: (K, V) ⇒ (K2, V2)): Map[K2, V2]
    Definition Classes
    MapPolyTransforms

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def ++[B >: (K, V)](xs: IterableOnce[B]): Iterable[B]

    Concatenation

    Concatenation

    Definition Classes
    IterablePolyTransforms
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def flatMap[B](f: ((K, V)) ⇒ IterableOnce[B]): Iterable[B]

    Flatmap

    Flatmap

    Definition Classes
    IterablePolyTransforms
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def map[B](f: ((K, V)) ⇒ B): Iterable[B]

    Map

    Map

    Definition Classes
    IterablePolyTransforms
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. def zip[B](xs: IterableOnce[B]): Iterable[((K, V), B)]

    Zip.

    Zip. Interesting because it requires to align to source collections.

    Definition Classes
    IterablePolyTransforms

Inherited from MapPolyTransforms[K, V, Map]

Inherited from IterablePolyTransforms[(K, V), Iterable]

Inherited from AnyRef

Inherited from Any

Ungrouped