Trait

scala

Product

Related Doc: package scala

Permalink

trait Product extends Equals

Base trait for all products, which in the standard library include at least scala.Product1 through scala.Product22 and therefore also their subclasses scala.Tuple1 through scala.Tuple22. In addition, all case classes implement Product with synthetically generated methods.

Version

1.0

Since

2.3

Linear Supertypes
Equals, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Product
  2. Equals
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean

    Permalink

    A method that should be called from every well-designed equals method that is open to be overridden in a subclass.

    A method that should be called from every well-designed equals method that is open to be overridden in a subclass. See Programming in Scala, Chapter 28 for discussion and design.

    that

    the value being probed for possible equality

    returns

    true if this instance can possibly equal that, otherwise false

    Definition Classes
    Equals
  2. abstract def getClass(): Class[_]

    Permalink
    Definition Classes
    Any
  3. abstract def productArity: Int

    Permalink

    The size of this product.

    The size of this product.

    returns

    for a product A(x1, ..., xk), returns k

  4. abstract def productElement(n: Int): Any

    Permalink

    The nth element of this product, 0-based.

    The nth element of this product, 0-based. In other words, for a product A(x1, ..., xk), returns x(n+1) where 0 < n < k.

    n

    the index of the element to return

    returns

    the element n elements after the first element

    Exceptions thrown

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  6. def hashCode(): Int

    Permalink
    Definition Classes
    Any
  7. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  8. def productIterator: Iterator[Any]

    Permalink

    An iterator over all the elements of this product.

    An iterator over all the elements of this product.

    returns

    in the default implementation, an Iterator[Any]

  9. def productPrefix: String

    Permalink

    A string used in the toString methods of derived classes.

    A string used in the toString methods of derived classes. Implementations may override this method to prepend a string prefix to the result of toString methods.

    returns

    in the default implementation, the empty string

  10. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from Equals

Inherited from Any

Ungrouped