scala.Tuple1

case class Tuple1[+T1](_1: T1) extends Product1[T1] with Product with Serializable

A tuple of 1 elements; the canonical representation of a scala.Product1.

Value Members From scala.Product1

def productElement(n: Int): Any

Returns the n-th projection of this product if 0 < n <= productArity, otherwise throws an IndexOutOfBoundsException .

  • n
    • number of the projection to be returned
  • returns
    • same as ._(n+1) , for example productElement(0) is the same as ._1 .
  • Definition Classes
    • Product1 → Product
  • Annotations
    • @ throws (clazz = classOf[IndexOutOfBoundsException])
  • Exceptions thrown *

(defined at scala.Product1)

Instance Constructors From scala.Tuple1

new Tuple1(_1: T1)

Create a new tuple with 1 elements.

  • _1
    • Element 1 of this Tuple1 (defined at scala.Tuple1)

Full Source:

/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2002-2013, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */
// GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp.

package scala


/** A tuple of 1 elements; the canonical representation of a [[scala.Product1]].
 *
 *  @constructor  Create a new tuple with 1 elements.
 *  @param  _1   Element 1 of this Tuple1
 */
@deprecatedInheritance("Tuples will be made final in a future version.", "2.11.0")
case class Tuple1[@specialized(Int, Long, Double) +T1](_1: T1)
  extends Product1[T1]
{
  override def toString() = "(" + _1 + ")"
  
}