Packages

  • package root

    This is the documentation for the Scala standard library.

    This is the documentation for the Scala standard library.

    Package structure

    The scala package contains core types like Int, Float, Array or Option which are accessible in all Scala compilation units without explicit qualification or imports.

    Notable packages include:

    Other packages exist. See the complete list on the right.

    Additional parts of the standard library are shipped as separate libraries. These include:

    • scala.reflect - Scala's reflection API (scala-reflect.jar)
    • scala.xml - XML parsing, manipulation, and serialization (scala-xml.jar)
    • scala.collection.parallel - Parallel collections (scala-parallel-collections.jar)
    • scala.util.parsing - Parser combinators (scala-parser-combinators.jar)
    • scala.swing - A convenient wrapper around Java's GUI framework called Swing (scala-swing.jar)

    Automatic imports

    Identifiers in the scala package and the scala.Predef object are always in scope by default.

    Some of these identifiers are type aliases provided as shortcuts to commonly used classes. For example, List is an alias for scala.collection.immutable.List.

    Other aliases refer to classes provided by the underlying platform. For example, on the JVM, String is an alias for java.lang.String.

    Definition Classes
    root
  • package scala

    Core Scala types.

    Core Scala types. They are always available without an explicit import.

    Definition Classes
    root
  • package math

    The package object scala.math contains methods for performing basic numeric operations such as elementary exponential, logarithmic, root and trigonometric functions.

    The package object scala.math contains methods for performing basic numeric operations such as elementary exponential, logarithmic, root and trigonometric functions.

    All methods forward to java.lang.Math unless otherwise noted.

    Definition Classes
    scala
    See also

    java.lang.Math

  • object BigDecimal extends java.io.Serializable

    Definition Classes
    math
    Since

    2.7

  • RoundingMode
o

scala.math.BigDecimal

RoundingMode

object RoundingMode extends Enumeration

Source
BigDecimal.scala
Linear Supertypes
Enumeration, java.io.Serializable, AnyRef, Any
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RoundingMode
  2. Enumeration
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class Value extends Ordered[Value] with Serializable

    The type of the enumerated values.

    The type of the enumerated values.

    Definition Classes
    Enumeration
    Annotations
    @SerialVersionUID()
  2. class ValueSet extends AbstractSet[Value] with SortedSet[Value] with SortedSetOps[Value, SortedSet, ValueSet] with StrictOptimizedIterableOps[Value, Set, ValueSet] with Serializable

    A class for sets of values.

    A class for sets of values. Iterating through this set will yield values in increasing order of their ids.

    Definition Classes
    Enumeration
  3. type RoundingMode = Value

Value Members

  1. implicit object ValueOrdering extends Ordering[Value]

    An ordering by id for values of this set

    An ordering by id for values of this set

    Definition Classes
    Enumeration
  2. object ValueSet extends SpecificIterableFactory[Value, ValueSet] with java.io.Serializable

    A factory object for value sets

    A factory object for value sets

    Definition Classes
    Enumeration
    Annotations
    @SerialVersionUID()
  3. val CEILING: Value
  4. val DOWN: Value
  5. val FLOOR: Value
  6. val HALF_DOWN: Value
  7. val HALF_EVEN: Value
  8. val HALF_UP: Value
  9. val UNNECESSARY: Value
  10. val UP: Value
  11. final def apply(x: Int): Value

    The value of this enumeration with given id x

    The value of this enumeration with given id x

    Definition Classes
    Enumeration
  12. final def maxId: Int

    The one higher than the highest integer amongst those used to identify values in this enumeration.

    The one higher than the highest integer amongst those used to identify values in this enumeration.

    Definition Classes
    Enumeration
  13. def toString(): String

    The name of this enumeration.

    The name of this enumeration.

    returns

    a String representation of the object.

    Definition Classes
    Enumeration → AnyRef → Any
  14. def values: ValueSet

    The values of this enumeration as a set.

    The values of this enumeration as a set.

    Definition Classes
    Enumeration
  15. final def withName(s: String): Value

    Return a Value from this Enumeration whose name matches the argument s.

    Return a Value from this Enumeration whose name matches the argument s. The names are determined automatically via reflection.

    s

    an Enumeration name

    returns

    the Value of this Enumeration if its name matches s

    Definition Classes
    Enumeration
    Exceptions thrown

    NoSuchElementException if no Value with a matching name is in this Enumeration