scala

Tuple2

class Tuple2[+T1, +T2](_1: T1, _2: T2) extends Product2[T1, T2] with Product

Tuple2 is the canonical representation of a @see Product2

Inherits

  1. Product2
  2. Product
  3. Equals
  4. AnyRef
  5. Any

Type Members

  1. class Zipped[+Repr1, +El1, +Repr2, +El2] extends AnyRef

Value Members

  1. val _1: T1

    projection of this product

  2. val _2: T2

    projection of this product

  3. def canEqual(arg0: Any): Boolean

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

  4. def equals(arg0: Any): Boolean

    The equality method defined in AnyRef

  5. def hashCode(): Int

    Returns a hash code value for the object

  6. def productArity: Int

    The arity of this product

  7. def productElement(n: Int): Any

    Returns the n-th projection of this product if 0<=n<arity, otherwise null

  8. def productElements: Iterator[Any]

  9. def productIterator: Iterator[Any]

    An iterator that returns all fields of this product

  10. def productPrefix: String

    By default the empty string

  11. def swap: (T2, T1)

    Swap the elements of the tuple

  12. def toString(): String

    Returns a string representation of the object

  13. def zip[Repr1, El1, El2, To](w1: (T1) ⇒ TraversableLike[El1, Repr1], w2: (T2) ⇒ Iterable[El2], cbf1: CanBuildFrom[Repr1, (El1, El2), To]): To

  14. def zipped[Repr1, El1, Repr2, El2](w1: (T1) ⇒ TraversableLike[El1, Repr1], w2: (T2) ⇒ IterableLike[El2, Repr2]): Zipped[Repr1, El1, Repr2, El2]

Instance constructors

  1. new Tuple2(_1: T1, _2: T2)

  2. new Tuple2()