Scala Library Documentation
|
|
scala/Product.scala
]
trait
Product
extends
AnyRefProduct
defines access functions for instances
of products, in particular case classes.Method Summary | |
def
|
arity
: Int
return k for a product
A(x_1,...,x_k)) |
def
|
element
(n : Int) : Any
for a case class
A(x_1,...,x_k)) , returns x_(i+1)
for 0 <= i < k |
abstract def
|
productArity
: Int
return k for a product
A(x_1,...,x_k)) |
abstract def
|
productElement
(n : Int) : Any
for a case class
A(x_1,...,x_k)) , returns x_(i+1)
for 0 <= i < k |
def
|
productPrefix
: java.lang.String
By default the empty string. Implementations may override this
method in order to prepend a string prefix to the result of the
toString methods.
|
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
A(x_1,...,x_k))
, returns x_(i+1)
for 0 <= i < k
n -
the position of the n-th elementIndexOutOfBoundsException -
def
element(n : Int) : Any
A(x_1,...,x_k))
, returns x_(i+1)
for 0 <= i < k
n -
the position of the n-th elementIndexOutOfBoundsException -
abstract
def
productArity : Int
A(x_1,...,x_k))
def
arity : Int
A(x_1,...,x_k))
def
productPrefix : java.lang.String
Scala Library Documentation
|
|