Symbol

final class Symbol extends Serializable

This class provides a simple way to get unique objects for equal strings.

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").

Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

override def equals(other: Any): Boolean
Definition Classes
Any
override def hashCode: Int
Definition Classes
Any
override def toString(): String

Converts this symbol to a string.

Converts this symbol to a string.

Definition Classes
Any

Concrete fields

val name: String