Packages

final class Symbol extends Serializable

This class provides a simple way to get unique objects for equal strings. Since symbols are interned, they can be compared using reference equality. Instances of Symbol can be created easily with Scala's built-in quote mechanism.

For instance, the Scala term 'mysym will invoke the constructor of the Symbol class in the following way: Symbol("mysym").

Source
Symbol.scala
Since

1.7

Linear Supertypes
Serializable, java.io.Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Symbol
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def equals(other: Any): Boolean

    The equality method for reference types.

    The equality method for reference types. Default implementation delegates to eq.

    See also equals in scala.Any.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    Symbol → AnyRef → Any
  2. def hashCode(): Int

    The hashCode method for reference types.

    The hashCode method for reference types. See hashCode in scala.Any.

    returns

    the hash code value for this object.

    Definition Classes
    Symbol → AnyRef → Any
  3. val name: String
  4. def toString(): String

    Converts this symbol to a string.

    Converts this symbol to a string.

    returns

    a String representation of the object.

    Definition Classes
    Symbol → AnyRef → Any