scala

trait Product2

[source: scala/Product2.scala]

trait Product2[+T1, +T2]
extends Product
Product2 is a cartesian product of 2 components
Direct Known Subclasses:
Tuple2

Method Summary
abstract def _1 : T1
projection of this product
abstract def _2 : T2
projection of this product
override def productArity : Int
The arity of this product.
override def productElement (n : Int) : Any
Returns the n-th projection of this product if 0<=n<arity, otherwise null.
Methods inherited from Product
productPrefix
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
override def productArity : Int
The arity of this product.
Returns
2
Overrides
Product.productArity

@throws(classOf[java.lang.IndexOutOfBoundsException])

override def productElement(n : Int) : Any
Returns the n-th projection of this product if 0<=n<arity, otherwise null.
Parameters
n - number of the projection to be returned
Returns
same as _(n+1)
Throws
IndexOutOfBoundsException -
Overrides
Product.productElement

abstract def _1 : T1
projection of this product

abstract def _2 : T2
projection of this product