Scala 2

API Specification

This document is the API specification for Scala 2.

Class Summary
abstract class BitSet

The class BitSet provides the interface for a space-efficient implementation of dense integer sets represented as bits in array of integers. Bit indices are between 0..(capacity-1) inclusive.



Trait Summary
abstract trait Map [A, +B]

This class defines the interface of collections that unambiguously map keys to values (i.e. a key is mapped to at least one value).

Class Map may only be used for accessing elements from map implementations. Two different extensions of class Map in the package scala.collection.mutable and scala.collection.immutable provide functionality for adding new key/value mappings to a map. The class in the first package is implemented by maps that are modified destructively, whereas the class in the second package is used by functional map implementations that rely on immutable data structures.


abstract trait MapProxy [A, +B]
This is a simple wrapper class for scala.collection.Map. It is most useful for assembling customized map abstractions dynamically using object composition and forwarding.
abstract trait Ranged [K, +A]
Any collection (including maps) whose keys (or elements) are ordered.
abstract trait Set [A]

This class defines the interface of collections that do not contain duplicate elements.

Class Set may only be used for accessing elements from set implementations. Two different extensions of class Set in the package scala.collection.mutable and scala.collection.immutable provide functionality for adding new elements to a set. The class in the first package is implemented by sets the are modified destructively, whereas the class in the second package is used by functional set implementations that rely on immutable data structures.


abstract trait SetProxy [A]
This is a simple wrapper class for scala.collection.Set. It is most useful for assembling customized set abstractions dynamically using object composition and forwarding.
abstract trait Sorted [K, +A]
Any collection (including maps) whose keys (or elements) are ordered.
abstract trait SortedMap [K, +E]
A map whose keys are sorted.
abstract trait SortedSet [A]
Analogous to a Java sorted set.