Scala 2.8.0.Beta1-RC2 API

This document is the API specification for Scala Library

Class Summary
class BigDecimal (val bigDecimal : java.math.BigDecimal, val mc : java.math.MathContext) extends ScalaNumericConversions
class BigInt (val bigInteger : java.math.BigInteger) extends ScalaNumericConversions
trait Equiv [T] extends AnyRef
trait Fractional [T] extends Numeric[T]
trait Integral [T] extends Numeric[T]
trait LowPriorityOrderingImplicits extends AnyRef
This would conflict with all the nice implicit Orderings available, but thanks to the magic of prioritized implicits via subclassing we can make Ordered[A] => Ordering[A] only turn up if nothing else works.
trait Numeric [T] extends Ordering[T]
trait Ordered [A] extends java.lang.Comparable[A] with AnyRef
A trait for totally ordered data. Note that since version 2006-07-24 this trait is no longer covariant in a. It is important that the equals method for an instance of Ordered[A] be consistent with the compare method. However, due to limitations inherent in the type erasure semantics, there is no reasonable way to provide a default implementation of equality for instances of Ordered[A]. Therefore, if you need to be able to use equality on an instance of Ordered[A] you must provide it yourself either when inheiriting or instantiating. It is important that the hashCode method for an instance of Ordered[A] be consistent with the compare method. However, it is not possible to provide a sensible default implementation. Therefore, if you need to be able compute the hash of an instance of Ordered[A] you must provide it yourself either when inheiriting or instantiating.
trait Ordering [T] extends java.util.Comparator[T] with PartialOrdering[T]
A trait for representing total orderings. It is important to distinguish between a type that has a total order and a representation of total ordering on some type. This trait is for representing the latter. A total ordering is a binary relation on a type T that is also an equivalence relation and partial ordering on values of type T. This relation is exposed as the compare method of the Ordering trait. This relation must be:
  • reflexive: compare(x, x) == 0, for any x of type T.
  • symmetry: compare(x, y) == z and compare(y, x) == w then math.signum(z) == -math.signum(w), for any x and y of type T and z and w of type Int.
  • transitive: if compare(x, y) == z and compare(y, w) == v and math.signum(z) >= 0 and math.signum(v) >= 0 then compare(x, w) == u and math.signum(z + v) == math.signum(u), for any x, y, and w of type T and z, v, and u of type Int.
trait PartialOrdering [T] extends Equiv[T] with AnyRef
trait PartiallyOrdered [+A] extends AnyRef
A class for partially ordered data.
trait ScalaNumericConversions extends scala.math.ScalaNumber with AnyRef
Conversions which present a consistent conversion interface across all the numeric types.
Object Summary
object BigDecimal extends AnyRef
object BigInt extends AnyRef
object Numeric extends AnyRef
object Ordered extends AnyRef
object Ordering extends LowPriorityOrderingImplicits
object package extends AnyRef