summaryrefslogtreecommitdiff
path: root/src/library/scala/Product0.scala
blob: 2072a13d4a5a4bb96f5388278b2c28d1f3c9a1c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2002-2007, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |                                         **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */

// $Id$

// generated by genprod on Tue Jan 02 15:19:32 CET 2007

package scala

import Predef._

object Product0 {
  def unapply(x: Product0): Some[Product0] =
    Some(x)
}

/** Product0 is a cartesian product of 0 components
 */
trait Product0 extends Product {

  /**
   *  The arity of this product.
   *  @return 0
   */
  override def arity = 0

  /**
   *  Returns the n-th projection of this product if 0<=n<arity,
   *  otherwise null.
   *
   *  @param n number of the projection to be returned
   *  @return  same as _(n+1)
   *  @throws  IndexOutOfBoundsException
   */
  override def element(n: Int) = n match {
    case _ => throw new IndexOutOfBoundsException(n.toString())
  }


}